build(deps): bump the go-deps group across 1 directory with 14 updates

Bumps the go-deps group with 11 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [cloud.google.com/go/compute](https://github.com/googleapis/google-cloud-go) | `1.25.1` | `1.26.0` |
| [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) | `1.5.1` | `1.5.2` |
| [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5](https://github.com/Azure/azure-sdk-for-go) | `5.5.0` | `5.7.0` |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.51.25` | `1.52.0` |
| [github.com/getsentry/sentry-go](https://github.com/getsentry/sentry-go) | `0.26.0` | `0.27.0` |
| [github.com/gophercloud/gophercloud](https://github.com/gophercloud/gophercloud) | `1.10.0` | `1.11.0` |
| [github.com/jackc/pgtype](https://github.com/jackc/pgtype) | `1.14.1` | `1.14.3` |
| [github.com/labstack/echo/v4](https://github.com/labstack/echo) | `4.11.4` | `4.12.0` |
| [github.com/openshift-online/ocm-sdk-go](https://github.com/openshift-online/ocm-sdk-go) | `0.1.398` | `0.1.418` |
| [github.com/osbuild/images](https://github.com/osbuild/images) | `0.56.0` | `0.58.0` |
| [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) | `1.18.0` | `1.19.0` |



Updates `cloud.google.com/go/compute` from 1.25.1 to 1.26.0
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.25.1...pubsub/v1.26.0)

Updates `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.5.1 to 1.5.2
- [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/sdk/internal/v1.5.1...sdk/internal/v1.5.2)

Updates `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5` from 5.5.0 to 5.7.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/sdk/resourcemanager/compute/armcompute/v5.5.0...sdk/resourcemanager/compute/armcompute/v5.7.0)

Updates `github.com/aws/aws-sdk-go` from 1.51.25 to 1.52.0
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.51.25...v1.52.0)

Updates `github.com/getsentry/sentry-go` from 0.26.0 to 0.27.0
- [Release notes](https://github.com/getsentry/sentry-go/releases)
- [Changelog](https://github.com/getsentry/sentry-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-go/compare/v0.26.0...v0.27.0)

Updates `github.com/gophercloud/gophercloud` from 1.10.0 to 1.11.0
- [Release notes](https://github.com/gophercloud/gophercloud/releases)
- [Changelog](https://github.com/gophercloud/gophercloud/blob/v1.11.0/CHANGELOG.md)
- [Commits](https://github.com/gophercloud/gophercloud/compare/v1.10.0...v1.11.0)

Updates `github.com/jackc/pgtype` from 1.14.1 to 1.14.3
- [Changelog](https://github.com/jackc/pgtype/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgtype/compare/v1.14.1...v1.14.3)

Updates `github.com/jackc/pgx/v4` from 4.18.1 to 4.18.2
- [Changelog](https://github.com/jackc/pgx/blob/v4.18.2/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v4.18.1...v4.18.2)

Updates `github.com/labstack/echo/v4` from 4.11.4 to 4.12.0
- [Release notes](https://github.com/labstack/echo/releases)
- [Changelog](https://github.com/labstack/echo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/labstack/echo/compare/v4.11.4...v4.12.0)

Updates `github.com/openshift-online/ocm-sdk-go` from 0.1.398 to 0.1.418
- [Release notes](https://github.com/openshift-online/ocm-sdk-go/releases)
- [Changelog](https://github.com/openshift-online/ocm-sdk-go/blob/main/CHANGES.md)
- [Commits](https://github.com/openshift-online/ocm-sdk-go/compare/v0.1.398...v0.1.418)

Updates `github.com/osbuild/images` from 0.56.0 to 0.58.0
- [Release notes](https://github.com/osbuild/images/releases)
- [Commits](https://github.com/osbuild/images/compare/v0.56.0...v0.58.0)

Updates `github.com/prometheus/client_golang` from 1.18.0 to 1.19.0
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.18.0...v1.19.0)

Updates `golang.org/x/sync` from 0.6.0 to 0.7.0
- [Commits](https://github.com/golang/sync/compare/v0.6.0...v0.7.0)

Updates `google.golang.org/api` from 0.175.0 to 0.177.0
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.175.0...v0.177.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/compute
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/getsentry/sentry-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/gophercloud/gophercloud
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/jackc/pgtype
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/jackc/pgx/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/labstack/echo/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/openshift-online/ocm-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/osbuild/images
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2024-05-02 04:46:13 +00:00 committed by Achilleas Koutsou
parent 49566b7ce4
commit 9193f3eebc
285 changed files with 70293 additions and 63914 deletions

55
go.mod
View file

@ -5,41 +5,41 @@ go 1.20
exclude github.com/mattn/go-sqlite3 v2.0.3+incompatible
require (
cloud.google.com/go/compute v1.25.1
cloud.google.com/go/compute v1.26.0
cloud.google.com/go/storage v1.40.0
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
github.com/Azure/go-autorest/autorest v0.11.29
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12
github.com/BurntSushi/toml v1.3.2
github.com/aws/aws-sdk-go v1.51.25
github.com/aws/aws-sdk-go v1.52.0
github.com/coreos/go-semver v0.3.1
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/deepmap/oapi-codegen v1.8.2
github.com/getkin/kin-openapi v0.93.0
github.com/getsentry/sentry-go v0.26.0
github.com/getsentry/sentry-go v0.27.0
github.com/gobwas/glob v0.2.3
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/gophercloud/gophercloud v1.10.0
github.com/gophercloud/gophercloud v1.11.0
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/jackc/pgtype v1.14.1
github.com/jackc/pgx/v4 v4.18.1
github.com/jackc/pgtype v1.14.3
github.com/jackc/pgx/v4 v4.18.3
github.com/julienschmidt/httprouter v1.3.0
github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b
github.com/labstack/echo/v4 v4.11.4
github.com/labstack/echo/v4 v4.12.0
github.com/labstack/gommon v0.4.2
github.com/openshift-online/ocm-sdk-go v0.1.398
github.com/openshift-online/ocm-sdk-go v0.1.418
github.com/oracle/oci-go-sdk/v54 v54.0.0
github.com/osbuild/images v0.56.0
github.com/osbuild/images v0.58.0
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1
github.com/osbuild/pulp-client v0.1.0
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/client_golang v1.19.0
github.com/segmentio/ksuid v1.0.4
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
@ -48,20 +48,20 @@ require (
github.com/vmware/govmomi v0.37.1
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
golang.org/x/oauth2 v0.19.0
golang.org/x/sync v0.6.0
golang.org/x/sync v0.7.0
golang.org/x/sys v0.19.0
google.golang.org/api v0.175.0
google.golang.org/api v0.177.0
)
require (
cloud.google.com/go v0.112.1 // indirect
cloud.google.com/go/auth v0.2.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.1 // indirect
cloud.google.com/go v0.112.2 // indirect
cloud.google.com/go/auth v0.3.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/iam v1.1.7 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.6.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect
@ -70,7 +70,7 @@ require (
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.12.0-rc.3 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
@ -116,7 +116,7 @@ require (
github.com/go-openapi/validate v0.22.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
@ -133,10 +133,10 @@ require (
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.0 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/puddle v1.3.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
@ -153,7 +153,6 @@ require (
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/mattn/go-sqlite3 v1.14.22 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/microcosm-cc/bluemonday v1.0.23 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mistifyio/go-zfs/v3 v3.0.1 // indirect
@ -174,7 +173,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/proglottis/gpgme v0.1.3 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect
@ -209,11 +208,11 @@ require (
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.18.0 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/protobuf v1.34.0 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect

115
go.sum
View file

@ -1,12 +1,12 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM=
cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4=
cloud.google.com/go/auth v0.2.2 h1:gmxNJs4YZYcw6YvKRtVBaF2fyUE6UrWPyzU8jHvYfmI=
cloud.google.com/go/auth v0.2.2/go.mod h1:2bDNJWtWziDT3Pu1URxHHbkHE/BbOCuyUiKIGcNvafo=
cloud.google.com/go/auth/oauth2adapt v0.2.1 h1:VSPmMmUlT8CkIZ2PzD9AlLN+R3+D1clXMWHHa6vG/Ag=
cloud.google.com/go/auth/oauth2adapt v0.2.1/go.mod h1:tOdK/k+D2e4GEwfBRA48dKNQiDsqIXxLh7VU319eV0g=
cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU=
cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls=
cloud.google.com/go v0.112.2 h1:ZaGT6LiG7dBzi6zNOvVZwacaXlmf3lRqnC4DQzqyRQw=
cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms=
cloud.google.com/go/auth v0.3.0 h1:PRyzEpGfx/Z9e8+lHsbkoUVXD0gnu4MNmm7Gp8TQNIs=
cloud.google.com/go/auth v0.3.0/go.mod h1:lBv6NKTWp8E3LPzmO1TbiiRKc4drLOfHsgmlH9ogv5w=
cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4=
cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q=
cloud.google.com/go/compute v1.26.0 h1:uHf0NN2nvxl1Gh4QO83yRCOdMK4zivtMS5gv0dEX0hg=
cloud.google.com/go/compute v1.26.0/go.mod h1:T9RIRap4pVHCGUkVFRJ9hygT3KCXjip41X1GgWtBBII=
cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=
cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
cloud.google.com/go/iam v1.1.7 h1:z4VHOhwKLF/+UYXAJDFwGtNF0b6gjsW1Pk9Ml0U/IoM=
@ -20,12 +20,12 @@ github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0
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.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0 h1:MxA59PGoCFb+vCwRQi3PhQEwHj4+r2dhuv9HG+vM7iM=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.5.0/go.mod h1:uYt4CfhkJA9o0FN7jfE5minm/i4nUE4MjGUJkzB6Zs8=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.6.0 h1:sUFnFjzDUie80h24I7mrKtwCKgLY9L8h5Tp2x9+TWqk=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.6.0/go.mod h1:52JbnQTp15qg5mRkMBHwp0j0ZFwHJ42Sx3zVV5RE9p0=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 h1:LkHbJbgF3YyvC53aqYGR+wWQDn2Rdp9AQdGndf9QvY4=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0/go.mod h1:QyiQdW4f4/BIfB8ZutZ2s+28RAgfa/pT+zS++ZHyM1I=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0 h1:pPvTJ1dY0sA35JOeFq6TsY2xj6Z85Yo23Pj4wCCvu4o=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM=
@ -61,8 +61,8 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
@ -80,8 +80,8 @@ github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat6
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/aws/aws-sdk-go v1.51.25 h1:DjTT8mtmsachhV6yrXR8+yhnG6120dazr720nopRsls=
github.com/aws/aws-sdk-go v1.51.25/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.52.0 h1:ptgek/4B2v/ljsjYSEvLQ8LTD+SQyrqhOOWvHc/VGPI=
github.com/aws/aws-sdk-go v1.52.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@ -162,8 +162,8 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw
github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/getkin/kin-openapi v0.93.0 h1:fc9z+9VADQla6bEb7V+dtZmr9Gj4qB6ZsD8c3pqEK0E=
github.com/getkin/kin-openapi v0.93.0/go.mod h1:LWZfzOd7PRy8GJ1dJ6mCU6tNdSfOwRac1BUPam4aw6Q=
github.com/getsentry/sentry-go v0.26.0 h1:IX3++sF6/4B5JcevhdZfdKIHfyvMmAq/UnqcyT2H6mA=
github.com/getsentry/sentry-go v0.26.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps=
github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=
@ -254,8 +254,8 @@ github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw=
github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=
github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
@ -306,8 +306,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF
github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA=
github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4=
github.com/gophercloud/gophercloud v1.10.0 h1:watRMsaMDlSLuLkpLeLSQ87yvcuwIajNg6A5uLcjoIU=
github.com/gophercloud/gophercloud v1.10.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM=
github.com/gophercloud/gophercloud v1.11.0 h1:ls0O747DIq1D8SUHc7r2vI8BFbMLeLFuENaAIfEx7OM=
github.com/gophercloud/gophercloud v1.11.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM=
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
@ -342,8 +342,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU
github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q=
github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E=
github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w=
github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM=
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
@ -359,8 +359,8 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW
github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0=
github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag=
github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
@ -369,14 +369,15 @@ github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCM
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
github.com/jackc/pgtype v1.14.1 h1:LyDar7M2K0tShCWqzJ/ctzF1QC3Wzc9c8a6cHE0PFdc=
github.com/jackc/pgtype v1.14.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
github.com/jackc/pgtype v1.14.3 h1:h6W9cPuHsRWQFTWUZMAKMgG5jSwQI0Zurzdvlx3Plus=
github.com/jackc/pgtype v1.14.3/go.mod h1:aKeozOde08iifGosdJpz9MBZonJOUJxqNpPBcMJTlVA=
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0=
github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE=
github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=
github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA=
github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
@ -418,8 +419,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg=
github.com/labstack/echo/v4 v4.11.4 h1:vDZmA+qNeh1pd/cCkEicDMrjtrnMGQ1QFI9gWN1zGq8=
github.com/labstack/echo/v4 v4.11.4/go.mod h1:noh7EvLwqDsmh/X/HWKPUl1AjzJrhyptRyEbQJfxen8=
github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0=
github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM=
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
@ -459,8 +460,6 @@ github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebG
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY=
github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4=
github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU=
@ -498,12 +497,12 @@ github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE
github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/openshift-online/ocm-sdk-go v0.1.398 h1:6C1mDcPxzG4jSduOaWixTTI5gSEO+Jm7OW/00jVoWGI=
github.com/openshift-online/ocm-sdk-go v0.1.398/go.mod h1:tke8vKcE7eHKyRbkJv6qo4ljo919zhx04uyQTcgF5cQ=
github.com/openshift-online/ocm-sdk-go v0.1.418 h1:UgMcx16YOS0cs6c0b0ZXbffnjciiuvAp2fE63tnLwLI=
github.com/openshift-online/ocm-sdk-go v0.1.418/go.mod h1:CiAu2jwl3ITKOxkeV0Qnhzv4gs35AmpIzVABQLtcI2Y=
github.com/oracle/oci-go-sdk/v54 v54.0.0 h1:CDLjeSejv2aDpElAJrhKpi6zvT/zhZCZuXchUUZ+LS4=
github.com/oracle/oci-go-sdk/v54 v54.0.0/go.mod h1:+t+yvcFGVp+3ZnztnyxqXfQDsMlq8U25faBLa+mqCMc=
github.com/osbuild/images v0.56.0 h1:4/CMo4JgvPwD0lNi9HCExERc16RnPdXBQ9Ud6BRqAWg=
github.com/osbuild/images v0.56.0/go.mod h1:N22xBt8wITxz8JfWZNY0FCl/tisaNqmGAz+GN9c7OEU=
github.com/osbuild/images v0.58.0 h1:BKmePx5SyOMPP5pQyi0X40iIO7vjdUCfhNsIqRzRQfU=
github.com/osbuild/images v0.58.0/go.mod h1:nt/e/QnHQ0qdznAbfbLQs44Iz9kjV9NammmNZ7UI12U=
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1 h1:UFEJIcPa46W8gtWgOYzriRKYyy1t6SWL0BI7fPTuVvc=
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1/go.mod h1:z+WA+dX6qMwc7fqY5jCzESDIlg4WR2sBQezxsoXv9Ik=
github.com/osbuild/pulp-client v0.1.0 h1:L0C4ezBJGTamN3BKdv+rKLuq/WxXJbsFwz/Hj7aEmJ8=
@ -523,13 +522,13 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/proglottis/gpgme v0.1.3 h1:Crxx0oz4LKB3QXc5Ea0J19K/3ICfy3ftr5exgUK1AU0=
github.com/proglottis/gpgme v0.1.3/go.mod h1:fPbW/EZ0LvwQtH8Hy7eixhp1eF3G39dtx7GUN+0Gmy0=
github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk=
github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA=
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
@ -650,7 +649,7 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZ
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw=
go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
@ -686,6 +685,7 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@ -721,6 +721,7 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@ -736,8 +737,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -823,19 +824,19 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
google.golang.org/api v0.175.0 h1:9bMDh10V9cBuU8N45Wlc3cKkItfqMRV0Fi8UscLEtbY=
google.golang.org/api v0.175.0/go.mod h1:Rra+ltKu14pps/4xTycZfobMgLpbosoaaL7c+SEMrO8=
google.golang.org/api v0.177.0 h1:8a0p/BbPa65GlqGWtUKxot4p0TV8OGOfyTjtmkXNXmk=
google.golang.org/api v0.177.0/go.mod h1:srbhue4MLjkjbkux5p3dw/ocYOSZTaIEvf7bCOnFQDw=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY=
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=
google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c h1:kaI7oewGK5YnVwj+Y+EJBO/YN1ht8iTL9XkFHtVZLsc=
google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c/go.mod h1:VQW3tUculP/D4B+xVCo+VgSq8As6wA9ZjHl//pmk+6s=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw=
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw=
google.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6 h1:DTJM0R8LECCgFeUwApvcEJHz85HLagW8uRENYxHh1ww=
google.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6/go.mod h1:10yRODfgim2/T8csjQsMPgZOMvtytXKTDRzH6HRGzRw=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 h1:DujSIu+2tC9Ht0aPNA7jgj23Iq8Ewi5sgkQ++wdvonE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
@ -852,8 +853,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4=
google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

View file

@ -1,5 +1,17 @@
# Changelog
## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.2.2...auth/v0.3.0) (2024-04-23)
### Features
* **auth/httptransport:** Add ability to customize transport ([#10023](https://github.com/googleapis/google-cloud-go/issues/10023)) ([72c7f6b](https://github.com/googleapis/google-cloud-go/commit/72c7f6bbec3136cc7a62788fc7186bc33ef6c3b3)), refs [#9812](https://github.com/googleapis/google-cloud-go/issues/9812) [#9814](https://github.com/googleapis/google-cloud-go/issues/9814)
### Bug Fixes
* **auth/credentials:** Error on bad file name if explicitly set ([#10018](https://github.com/googleapis/google-cloud-go/issues/10018)) ([55beaa9](https://github.com/googleapis/google-cloud-go/commit/55beaa993aaf052d8be39766afc6777c3c2a0bdd)), refs [#9809](https://github.com/googleapis/google-cloud-go/issues/9809)
## [0.2.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.2.1...auth/v0.2.2) (2024-04-19)

View file

@ -76,7 +76,10 @@ func DetectDefault(opts *DetectOptions) (*auth.Credentials, error) {
if opts.CredentialsJSON != nil {
return readCredentialsFileJSON(opts.CredentialsJSON, opts)
}
if filename := credsfile.GetFileNameFromEnv(opts.CredentialsFile); filename != "" {
if opts.CredentialsFile != "" {
return readCredentialsFile(opts.CredentialsFile, opts)
}
if filename := os.Getenv(credsfile.GoogleAppCredsEnvVar); filename != "" {
if creds, err := readCredentialsFile(filename, opts); err == nil {
return creds, err
}

View file

@ -44,6 +44,9 @@ type Options struct {
// Headers are extra HTTP headers that will be appended to every outgoing
// request.
Headers http.Header
// BaseRoundTripper overrides the base transport used for serving requests.
// If specified ClientCertProvider is ignored.
BaseRoundTripper http.RoundTripper
// Endpoint overrides the default endpoint to be used for a service.
Endpoint string
// APIKey specifies an API key to be used as the basis for authentication.
@ -181,7 +184,11 @@ func NewClient(opts *Options) (*http.Client, error) {
if err != nil {
return nil, err
}
trans, err := newTransport(defaultBaseTransport(clientCertProvider, dialTLSContext), opts)
baseRoundTripper := opts.BaseRoundTripper
if baseRoundTripper == nil {
baseRoundTripper = defaultBaseTransport(clientCertProvider, dialTLSContext)
}
trans, err := newTransport(baseRoundTripper, opts)
if err != nil {
return nil, err
}

View file

@ -1,5 +1,12 @@
# Changelog
## [0.2.2](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.1...auth/oauth2adapt/v0.2.2) (2024-04-23)
### Bug Fixes
* **auth/oauth2adapt:** Bump x/net to v0.24.0 ([ba31ed5](https://github.com/googleapis/google-cloud-go/commit/ba31ed5fda2c9664f2e1cf972469295e63deb5b4))
## [0.2.1](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.0...auth/oauth2adapt/v0.2.1) (2024-04-18)

View file

@ -1344,6 +1344,53 @@ func (it *InstanceGroupManagerIterator) takeBuf() interface{} {
return b
}
// InstanceGroupManagerResizeRequestIterator manages a stream of *computepb.InstanceGroupManagerResizeRequest.
type InstanceGroupManagerResizeRequestIterator struct {
items []*computepb.InstanceGroupManagerResizeRequest
pageInfo *iterator.PageInfo
nextFunc func() error
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*computepb.InstanceGroupManagerResizeRequest, nextPageToken string, err error)
}
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func (it *InstanceGroupManagerResizeRequestIterator) PageInfo() *iterator.PageInfo {
return it.pageInfo
}
// Next returns the next result. Its second return value is iterator.Done if there are no more
// results. Once Next returns Done, all subsequent calls will return Done.
func (it *InstanceGroupManagerResizeRequestIterator) Next() (*computepb.InstanceGroupManagerResizeRequest, error) {
var item *computepb.InstanceGroupManagerResizeRequest
if err := it.nextFunc(); err != nil {
return item, err
}
item = it.items[0]
it.items = it.items[1:]
return item, nil
}
func (it *InstanceGroupManagerResizeRequestIterator) bufLen() int {
return len(it.items)
}
func (it *InstanceGroupManagerResizeRequestIterator) takeBuf() interface{} {
b := it.items
it.items = nil
return b
}
// InstanceGroupManagersScopedListPair is a holder type for string/*computepb.InstanceGroupManagersScopedList map entries
type InstanceGroupManagersScopedListPair struct {
Key string
@ -4396,6 +4443,253 @@ func (it *SslPolicyIterator) takeBuf() interface{} {
return b
}
// StoragePoolDiskIterator manages a stream of *computepb.StoragePoolDisk.
type StoragePoolDiskIterator struct {
items []*computepb.StoragePoolDisk
pageInfo *iterator.PageInfo
nextFunc func() error
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*computepb.StoragePoolDisk, nextPageToken string, err error)
}
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func (it *StoragePoolDiskIterator) PageInfo() *iterator.PageInfo {
return it.pageInfo
}
// Next returns the next result. Its second return value is iterator.Done if there are no more
// results. Once Next returns Done, all subsequent calls will return Done.
func (it *StoragePoolDiskIterator) Next() (*computepb.StoragePoolDisk, error) {
var item *computepb.StoragePoolDisk
if err := it.nextFunc(); err != nil {
return item, err
}
item = it.items[0]
it.items = it.items[1:]
return item, nil
}
func (it *StoragePoolDiskIterator) bufLen() int {
return len(it.items)
}
func (it *StoragePoolDiskIterator) takeBuf() interface{} {
b := it.items
it.items = nil
return b
}
// StoragePoolIterator manages a stream of *computepb.StoragePool.
type StoragePoolIterator struct {
items []*computepb.StoragePool
pageInfo *iterator.PageInfo
nextFunc func() error
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*computepb.StoragePool, nextPageToken string, err error)
}
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func (it *StoragePoolIterator) PageInfo() *iterator.PageInfo {
return it.pageInfo
}
// Next returns the next result. Its second return value is iterator.Done if there are no more
// results. Once Next returns Done, all subsequent calls will return Done.
func (it *StoragePoolIterator) Next() (*computepb.StoragePool, error) {
var item *computepb.StoragePool
if err := it.nextFunc(); err != nil {
return item, err
}
item = it.items[0]
it.items = it.items[1:]
return item, nil
}
func (it *StoragePoolIterator) bufLen() int {
return len(it.items)
}
func (it *StoragePoolIterator) takeBuf() interface{} {
b := it.items
it.items = nil
return b
}
// StoragePoolTypeIterator manages a stream of *computepb.StoragePoolType.
type StoragePoolTypeIterator struct {
items []*computepb.StoragePoolType
pageInfo *iterator.PageInfo
nextFunc func() error
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*computepb.StoragePoolType, nextPageToken string, err error)
}
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func (it *StoragePoolTypeIterator) PageInfo() *iterator.PageInfo {
return it.pageInfo
}
// Next returns the next result. Its second return value is iterator.Done if there are no more
// results. Once Next returns Done, all subsequent calls will return Done.
func (it *StoragePoolTypeIterator) Next() (*computepb.StoragePoolType, error) {
var item *computepb.StoragePoolType
if err := it.nextFunc(); err != nil {
return item, err
}
item = it.items[0]
it.items = it.items[1:]
return item, nil
}
func (it *StoragePoolTypeIterator) bufLen() int {
return len(it.items)
}
func (it *StoragePoolTypeIterator) takeBuf() interface{} {
b := it.items
it.items = nil
return b
}
// StoragePoolTypesScopedListPair is a holder type for string/*computepb.StoragePoolTypesScopedList map entries
type StoragePoolTypesScopedListPair struct {
Key string
Value *computepb.StoragePoolTypesScopedList
}
// StoragePoolTypesScopedListPairIterator manages a stream of StoragePoolTypesScopedListPair.
type StoragePoolTypesScopedListPairIterator struct {
items []StoragePoolTypesScopedListPair
pageInfo *iterator.PageInfo
nextFunc func() error
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []StoragePoolTypesScopedListPair, nextPageToken string, err error)
}
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func (it *StoragePoolTypesScopedListPairIterator) PageInfo() *iterator.PageInfo {
return it.pageInfo
}
// Next returns the next result. Its second return value is iterator.Done if there are no more
// results. Once Next returns Done, all subsequent calls will return Done.
func (it *StoragePoolTypesScopedListPairIterator) Next() (StoragePoolTypesScopedListPair, error) {
var item StoragePoolTypesScopedListPair
if err := it.nextFunc(); err != nil {
return item, err
}
item = it.items[0]
it.items = it.items[1:]
return item, nil
}
func (it *StoragePoolTypesScopedListPairIterator) bufLen() int {
return len(it.items)
}
func (it *StoragePoolTypesScopedListPairIterator) takeBuf() interface{} {
b := it.items
it.items = nil
return b
}
// StoragePoolsScopedListPair is a holder type for string/*computepb.StoragePoolsScopedList map entries
type StoragePoolsScopedListPair struct {
Key string
Value *computepb.StoragePoolsScopedList
}
// StoragePoolsScopedListPairIterator manages a stream of StoragePoolsScopedListPair.
type StoragePoolsScopedListPairIterator struct {
items []StoragePoolsScopedListPair
pageInfo *iterator.PageInfo
nextFunc func() error
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []StoragePoolsScopedListPair, nextPageToken string, err error)
}
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func (it *StoragePoolsScopedListPairIterator) PageInfo() *iterator.PageInfo {
return it.pageInfo
}
// Next returns the next result. Its second return value is iterator.Done if there are no more
// results. Once Next returns Done, all subsequent calls will return Done.
func (it *StoragePoolsScopedListPairIterator) Next() (StoragePoolsScopedListPair, error) {
var item StoragePoolsScopedListPair
if err := it.nextFunc(); err != nil {
return item, err
}
item = it.items[0]
it.items = it.items[1:]
return item, nil
}
func (it *StoragePoolsScopedListPairIterator) bufLen() int {
return len(it.items)
}
func (it *StoragePoolsScopedListPairIterator) takeBuf() interface{} {
b := it.items
it.items = nil
return b
}
// SubnetworkIterator manages a stream of *computepb.Subnetwork.
type SubnetworkIterator struct {
items []*computepb.Subnetwork

File diff suppressed because it is too large Load diff

View file

@ -80,6 +80,12 @@
// }
// // TODO: Use resp.
// _ = resp
//
// // If you need to access the underlying RPC response,
// // you can do so by casting the `Response` as below.
// // Otherwise, remove this line. Only populated after
// // first call to Next(). Not safe for concurrent access.
// _ = it.Response.(*computepb.AcceleratorTypeAggregatedList)
// }
//
// # Use of Context

View file

@ -965,6 +965,40 @@
}
}
},
"InstanceGroupManagerResizeRequests": {
"clients": {
"rest": {
"libraryClient": "InstanceGroupManagerResizeRequestsClient",
"rpcs": {
"Cancel": {
"methods": [
"Cancel"
]
},
"Delete": {
"methods": [
"Delete"
]
},
"Get": {
"methods": [
"Get"
]
},
"Insert": {
"methods": [
"Insert"
]
},
"List": {
"methods": [
"List"
]
}
}
}
}
},
"InstanceGroupManagers": {
"clients": {
"rest": {
@ -1128,6 +1162,25 @@
}
}
},
"InstanceSettingsService": {
"clients": {
"rest": {
"libraryClient": "InstanceSettingsClient",
"rpcs": {
"Get": {
"methods": [
"Get"
]
},
"Patch": {
"methods": [
"Patch"
]
}
}
}
}
},
"InstanceTemplates": {
"clients": {
"rest": {
@ -2092,6 +2145,11 @@
"Patch"
]
},
"PerformMaintenance": {
"methods": [
"PerformMaintenance"
]
},
"SetIamPolicy": {
"methods": [
"SetIamPolicy"
@ -3935,6 +3993,89 @@
}
}
},
"StoragePoolTypes": {
"clients": {
"rest": {
"libraryClient": "StoragePoolTypesClient",
"rpcs": {
"AggregatedList": {
"methods": [
"AggregatedList"
]
},
"Get": {
"methods": [
"Get"
]
},
"List": {
"methods": [
"List"
]
}
}
}
}
},
"StoragePools": {
"clients": {
"rest": {
"libraryClient": "StoragePoolsClient",
"rpcs": {
"AggregatedList": {
"methods": [
"AggregatedList"
]
},
"Delete": {
"methods": [
"Delete"
]
},
"Get": {
"methods": [
"Get"
]
},
"GetIamPolicy": {
"methods": [
"GetIamPolicy"
]
},
"Insert": {
"methods": [
"Insert"
]
},
"List": {
"methods": [
"List"
]
},
"ListDisks": {
"methods": [
"ListDisks"
]
},
"SetIamPolicy": {
"methods": [
"SetIamPolicy"
]
},
"TestIamPermissions": {
"methods": [
"TestIamPermissions"
]
},
"Update": {
"methods": [
"Update"
]
}
}
}
}
},
"Subnetworks": {
"clients": {
"rest": {

View file

@ -0,0 +1,616 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package compute
import (
"bytes"
"context"
"fmt"
"io"
"math"
"net/http"
"net/url"
"time"
computepb "cloud.google.com/go/compute/apiv1/computepb"
gax "github.com/googleapis/gax-go/v2"
"google.golang.org/api/googleapi"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/api/option/internaloption"
httptransport "google.golang.org/api/transport/http"
"google.golang.org/grpc"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
)
var newInstanceGroupManagerResizeRequestsClientHook clientHook
// InstanceGroupManagerResizeRequestsCallOptions contains the retry settings for each method of InstanceGroupManagerResizeRequestsClient.
type InstanceGroupManagerResizeRequestsCallOptions struct {
Cancel []gax.CallOption
Delete []gax.CallOption
Get []gax.CallOption
Insert []gax.CallOption
List []gax.CallOption
}
func defaultInstanceGroupManagerResizeRequestsRESTCallOptions() *InstanceGroupManagerResizeRequestsCallOptions {
return &InstanceGroupManagerResizeRequestsCallOptions{
Cancel: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
Delete: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
Get: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
gax.WithRetry(func() gax.Retryer {
return gax.OnHTTPCodes(gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
Multiplier: 1.30,
},
http.StatusGatewayTimeout,
http.StatusServiceUnavailable)
}),
},
Insert: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
List: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
gax.WithRetry(func() gax.Retryer {
return gax.OnHTTPCodes(gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
Multiplier: 1.30,
},
http.StatusGatewayTimeout,
http.StatusServiceUnavailable)
}),
},
}
}
// internalInstanceGroupManagerResizeRequestsClient is an interface that defines the methods available from Google Compute Engine API.
type internalInstanceGroupManagerResizeRequestsClient interface {
Close() error
setGoogleClientInfo(...string)
Connection() *grpc.ClientConn
Cancel(context.Context, *computepb.CancelInstanceGroupManagerResizeRequestRequest, ...gax.CallOption) (*Operation, error)
Delete(context.Context, *computepb.DeleteInstanceGroupManagerResizeRequestRequest, ...gax.CallOption) (*Operation, error)
Get(context.Context, *computepb.GetInstanceGroupManagerResizeRequestRequest, ...gax.CallOption) (*computepb.InstanceGroupManagerResizeRequest, error)
Insert(context.Context, *computepb.InsertInstanceGroupManagerResizeRequestRequest, ...gax.CallOption) (*Operation, error)
List(context.Context, *computepb.ListInstanceGroupManagerResizeRequestsRequest, ...gax.CallOption) *InstanceGroupManagerResizeRequestIterator
}
// InstanceGroupManagerResizeRequestsClient is a client for interacting with Google Compute Engine API.
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
//
// The InstanceGroupManagerResizeRequests API.
type InstanceGroupManagerResizeRequestsClient struct {
// The internal transport-dependent client.
internalClient internalInstanceGroupManagerResizeRequestsClient
// The call options for this service.
CallOptions *InstanceGroupManagerResizeRequestsCallOptions
}
// Wrapper methods routed to the internal client.
// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *InstanceGroupManagerResizeRequestsClient) Close() error {
return c.internalClient.Close()
}
// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *InstanceGroupManagerResizeRequestsClient) setGoogleClientInfo(keyval ...string) {
c.internalClient.setGoogleClientInfo(keyval...)
}
// Connection returns a connection to the API service.
//
// Deprecated: Connections are now pooled so this method does not always
// return the same resource.
func (c *InstanceGroupManagerResizeRequestsClient) Connection() *grpc.ClientConn {
return c.internalClient.Connection()
}
// Cancel cancels the specified resize request and removes it from the queue. Cancelled resize request does no longer wait for the resources to be provisioned. Cancel is only possible for requests that are accepted in the queue.
func (c *InstanceGroupManagerResizeRequestsClient) Cancel(ctx context.Context, req *computepb.CancelInstanceGroupManagerResizeRequestRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.Cancel(ctx, req, opts...)
}
// Delete deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously.
func (c *InstanceGroupManagerResizeRequestsClient) Delete(ctx context.Context, req *computepb.DeleteInstanceGroupManagerResizeRequestRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.Delete(ctx, req, opts...)
}
// Get returns all of the details about the specified resize request.
func (c *InstanceGroupManagerResizeRequestsClient) Get(ctx context.Context, req *computepb.GetInstanceGroupManagerResizeRequestRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManagerResizeRequest, error) {
return c.internalClient.Get(ctx, req, opts...)
}
// Insert creates a new resize request that starts provisioning VMs immediately or queues VM creation.
func (c *InstanceGroupManagerResizeRequestsClient) Insert(ctx context.Context, req *computepb.InsertInstanceGroupManagerResizeRequestRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.Insert(ctx, req, opts...)
}
// List retrieves a list of resize requests that are contained in the managed instance group.
func (c *InstanceGroupManagerResizeRequestsClient) List(ctx context.Context, req *computepb.ListInstanceGroupManagerResizeRequestsRequest, opts ...gax.CallOption) *InstanceGroupManagerResizeRequestIterator {
return c.internalClient.List(ctx, req, opts...)
}
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
type instanceGroupManagerResizeRequestsRESTClient struct {
// The http endpoint to connect to.
endpoint string
// The http client.
httpClient *http.Client
// operationClient is used to call the operation-specific management service.
operationClient *ZoneOperationsClient
// The x-goog-* headers to be sent with each request.
xGoogHeaders []string
// Points back to the CallOptions field of the containing InstanceGroupManagerResizeRequestsClient
CallOptions **InstanceGroupManagerResizeRequestsCallOptions
}
// NewInstanceGroupManagerResizeRequestsRESTClient creates a new instance group manager resize requests rest client.
//
// The InstanceGroupManagerResizeRequests API.
func NewInstanceGroupManagerResizeRequestsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceGroupManagerResizeRequestsClient, error) {
clientOpts := append(defaultInstanceGroupManagerResizeRequestsRESTClientOptions(), opts...)
httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)
if err != nil {
return nil, err
}
callOpts := defaultInstanceGroupManagerResizeRequestsRESTCallOptions()
c := &instanceGroupManagerResizeRequestsRESTClient{
endpoint: endpoint,
httpClient: httpClient,
CallOptions: &callOpts,
}
c.setGoogleClientInfo()
o := []option.ClientOption{
option.WithHTTPClient(httpClient),
option.WithEndpoint(endpoint),
}
opC, err := NewZoneOperationsRESTClient(ctx, o...)
if err != nil {
return nil, err
}
c.operationClient = opC
return &InstanceGroupManagerResizeRequestsClient{internalClient: c, CallOptions: callOpts}, nil
}
func defaultInstanceGroupManagerResizeRequestsRESTClientOptions() []option.ClientOption {
return []option.ClientOption{
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
internaloption.WithDefaultUniverseDomain("googleapis.com"),
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
}
}
// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *instanceGroupManagerResizeRequestsRESTClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN")
c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)}
}
// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *instanceGroupManagerResizeRequestsRESTClient) Close() error {
// Replace httpClient with nil to force cleanup.
c.httpClient = nil
if err := c.operationClient.Close(); err != nil {
return err
}
return nil
}
// Connection returns a connection to the API service.
//
// Deprecated: This method always returns nil.
func (c *instanceGroupManagerResizeRequestsRESTClient) Connection() *grpc.ClientConn {
return nil
}
// Cancel cancels the specified resize request and removes it from the queue. Cancelled resize request does no longer wait for the resources to be provisioned. Cancel is only possible for requests that are accepted in the queue.
func (c *instanceGroupManagerResizeRequestsRESTClient) Cancel(ctx context.Context, req *computepb.CancelInstanceGroupManagerResizeRequestRequest, opts ...gax.CallOption) (*Operation, error) {
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/instanceGroupManagers/%v/resizeRequests/%v/cancel", req.GetProject(), req.GetZone(), req.GetInstanceGroupManager(), req.GetResizeRequest())
params := url.Values{}
if req != nil && req.RequestId != nil {
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "instance_group_manager", url.QueryEscape(req.GetInstanceGroupManager()), "resize_request", url.QueryEscape(req.GetResizeRequest()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).Cancel[0:len((*c.CallOptions).Cancel):len((*c.CallOptions).Cancel)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.Operation{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("POST", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
op := &Operation{
&zoneOperationsHandle{
c: c.operationClient,
proto: resp,
project: req.GetProject(),
zone: req.GetZone(),
},
}
return op, nil
}
// Delete deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously.
func (c *instanceGroupManagerResizeRequestsRESTClient) Delete(ctx context.Context, req *computepb.DeleteInstanceGroupManagerResizeRequestRequest, opts ...gax.CallOption) (*Operation, error) {
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/instanceGroupManagers/%v/resizeRequests/%v", req.GetProject(), req.GetZone(), req.GetInstanceGroupManager(), req.GetResizeRequest())
params := url.Values{}
if req != nil && req.RequestId != nil {
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "instance_group_manager", url.QueryEscape(req.GetInstanceGroupManager()), "resize_request", url.QueryEscape(req.GetResizeRequest()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).Delete[0:len((*c.CallOptions).Delete):len((*c.CallOptions).Delete)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.Operation{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
op := &Operation{
&zoneOperationsHandle{
c: c.operationClient,
proto: resp,
project: req.GetProject(),
zone: req.GetZone(),
},
}
return op, nil
}
// Get returns all of the details about the specified resize request.
func (c *instanceGroupManagerResizeRequestsRESTClient) Get(ctx context.Context, req *computepb.GetInstanceGroupManagerResizeRequestRequest, opts ...gax.CallOption) (*computepb.InstanceGroupManagerResizeRequest, error) {
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/instanceGroupManagers/%v/resizeRequests/%v", req.GetProject(), req.GetZone(), req.GetInstanceGroupManager(), req.GetResizeRequest())
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "instance_group_manager", url.QueryEscape(req.GetInstanceGroupManager()), "resize_request", url.QueryEscape(req.GetResizeRequest()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).Get[0:len((*c.CallOptions).Get):len((*c.CallOptions).Get)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.InstanceGroupManagerResizeRequest{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("GET", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
return resp, nil
}
// Insert creates a new resize request that starts provisioning VMs immediately or queues VM creation.
func (c *instanceGroupManagerResizeRequestsRESTClient) Insert(ctx context.Context, req *computepb.InsertInstanceGroupManagerResizeRequestRequest, opts ...gax.CallOption) (*Operation, error) {
m := protojson.MarshalOptions{AllowPartial: true}
body := req.GetInstanceGroupManagerResizeRequestResource()
jsonReq, err := m.Marshal(body)
if err != nil {
return nil, err
}
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/instanceGroupManagers/%v/resizeRequests", req.GetProject(), req.GetZone(), req.GetInstanceGroupManager())
params := url.Values{}
if req != nil && req.RequestId != nil {
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "instance_group_manager", url.QueryEscape(req.GetInstanceGroupManager()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).Insert[0:len((*c.CallOptions).Insert):len((*c.CallOptions).Insert)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.Operation{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq))
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
op := &Operation{
&zoneOperationsHandle{
c: c.operationClient,
proto: resp,
project: req.GetProject(),
zone: req.GetZone(),
},
}
return op, nil
}
// List retrieves a list of resize requests that are contained in the managed instance group.
func (c *instanceGroupManagerResizeRequestsRESTClient) List(ctx context.Context, req *computepb.ListInstanceGroupManagerResizeRequestsRequest, opts ...gax.CallOption) *InstanceGroupManagerResizeRequestIterator {
it := &InstanceGroupManagerResizeRequestIterator{}
req = proto.Clone(req).(*computepb.ListInstanceGroupManagerResizeRequestsRequest)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
it.InternalFetch = func(pageSize int, pageToken string) ([]*computepb.InstanceGroupManagerResizeRequest, string, error) {
resp := &computepb.InstanceGroupManagerResizeRequestsListResponse{}
if pageToken != "" {
req.PageToken = proto.String(pageToken)
}
if pageSize > math.MaxInt32 {
req.MaxResults = proto.Uint32(math.MaxInt32)
} else if pageSize != 0 {
req.MaxResults = proto.Uint32(uint32(pageSize))
}
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, "", err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/instanceGroupManagers/%v/resizeRequests", req.GetProject(), req.GetZone(), req.GetInstanceGroupManager())
params := url.Values{}
if req != nil && req.Filter != nil {
params.Add("filter", fmt.Sprintf("%v", req.GetFilter()))
}
if req != nil && req.MaxResults != nil {
params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults()))
}
if req != nil && req.OrderBy != nil {
params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy()))
}
if req != nil && req.PageToken != nil {
params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken()))
}
if req != nil && req.ReturnPartialSuccess != nil {
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := append(c.xGoogHeaders, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("GET", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, "", e
}
it.Response = resp
return resp.GetItems(), resp.GetNextPageToken(), nil
}
fetch := func(pageSize int, pageToken string) (string, error) {
items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
if err != nil {
return "", err
}
it.items = append(it.items, items...)
return nextPageToken, nil
}
it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
it.pageInfo.MaxSize = int(req.GetMaxResults())
it.pageInfo.Token = req.GetPageToken()
return it
}

View file

@ -0,0 +1,340 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package compute
import (
"bytes"
"context"
"fmt"
"io"
"net/http"
"net/url"
"time"
computepb "cloud.google.com/go/compute/apiv1/computepb"
gax "github.com/googleapis/gax-go/v2"
"google.golang.org/api/googleapi"
"google.golang.org/api/option"
"google.golang.org/api/option/internaloption"
httptransport "google.golang.org/api/transport/http"
"google.golang.org/grpc"
"google.golang.org/protobuf/encoding/protojson"
)
var newInstanceSettingsClientHook clientHook
// InstanceSettingsCallOptions contains the retry settings for each method of InstanceSettingsClient.
type InstanceSettingsCallOptions struct {
Get []gax.CallOption
Patch []gax.CallOption
}
func defaultInstanceSettingsRESTCallOptions() *InstanceSettingsCallOptions {
return &InstanceSettingsCallOptions{
Get: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
gax.WithRetry(func() gax.Retryer {
return gax.OnHTTPCodes(gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
Multiplier: 1.30,
},
http.StatusGatewayTimeout,
http.StatusServiceUnavailable)
}),
},
Patch: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
}
}
// internalInstanceSettingsClient is an interface that defines the methods available from Google Compute Engine API.
type internalInstanceSettingsClient interface {
Close() error
setGoogleClientInfo(...string)
Connection() *grpc.ClientConn
Get(context.Context, *computepb.GetInstanceSettingRequest, ...gax.CallOption) (*computepb.InstanceSettings, error)
Patch(context.Context, *computepb.PatchInstanceSettingRequest, ...gax.CallOption) (*Operation, error)
}
// InstanceSettingsClient is a client for interacting with Google Compute Engine API.
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
//
// The InstanceSettings API.
type InstanceSettingsClient struct {
// The internal transport-dependent client.
internalClient internalInstanceSettingsClient
// The call options for this service.
CallOptions *InstanceSettingsCallOptions
}
// Wrapper methods routed to the internal client.
// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *InstanceSettingsClient) Close() error {
return c.internalClient.Close()
}
// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *InstanceSettingsClient) setGoogleClientInfo(keyval ...string) {
c.internalClient.setGoogleClientInfo(keyval...)
}
// Connection returns a connection to the API service.
//
// Deprecated: Connections are now pooled so this method does not always
// return the same resource.
func (c *InstanceSettingsClient) Connection() *grpc.ClientConn {
return c.internalClient.Connection()
}
// Get get Instance settings.
func (c *InstanceSettingsClient) Get(ctx context.Context, req *computepb.GetInstanceSettingRequest, opts ...gax.CallOption) (*computepb.InstanceSettings, error) {
return c.internalClient.Get(ctx, req, opts...)
}
// Patch patch Instance settings
func (c *InstanceSettingsClient) Patch(ctx context.Context, req *computepb.PatchInstanceSettingRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.Patch(ctx, req, opts...)
}
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
type instanceSettingsRESTClient struct {
// The http endpoint to connect to.
endpoint string
// The http client.
httpClient *http.Client
// operationClient is used to call the operation-specific management service.
operationClient *ZoneOperationsClient
// The x-goog-* headers to be sent with each request.
xGoogHeaders []string
// Points back to the CallOptions field of the containing InstanceSettingsClient
CallOptions **InstanceSettingsCallOptions
}
// NewInstanceSettingsRESTClient creates a new instance settings service rest client.
//
// The InstanceSettings API.
func NewInstanceSettingsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceSettingsClient, error) {
clientOpts := append(defaultInstanceSettingsRESTClientOptions(), opts...)
httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)
if err != nil {
return nil, err
}
callOpts := defaultInstanceSettingsRESTCallOptions()
c := &instanceSettingsRESTClient{
endpoint: endpoint,
httpClient: httpClient,
CallOptions: &callOpts,
}
c.setGoogleClientInfo()
o := []option.ClientOption{
option.WithHTTPClient(httpClient),
option.WithEndpoint(endpoint),
}
opC, err := NewZoneOperationsRESTClient(ctx, o...)
if err != nil {
return nil, err
}
c.operationClient = opC
return &InstanceSettingsClient{internalClient: c, CallOptions: callOpts}, nil
}
func defaultInstanceSettingsRESTClientOptions() []option.ClientOption {
return []option.ClientOption{
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
internaloption.WithDefaultUniverseDomain("googleapis.com"),
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
}
}
// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *instanceSettingsRESTClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN")
c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)}
}
// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *instanceSettingsRESTClient) Close() error {
// Replace httpClient with nil to force cleanup.
c.httpClient = nil
if err := c.operationClient.Close(); err != nil {
return err
}
return nil
}
// Connection returns a connection to the API service.
//
// Deprecated: This method always returns nil.
func (c *instanceSettingsRESTClient) Connection() *grpc.ClientConn {
return nil
}
// Get get Instance settings.
func (c *instanceSettingsRESTClient) Get(ctx context.Context, req *computepb.GetInstanceSettingRequest, opts ...gax.CallOption) (*computepb.InstanceSettings, error) {
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/instanceSettings", req.GetProject(), req.GetZone())
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).Get[0:len((*c.CallOptions).Get):len((*c.CallOptions).Get)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.InstanceSettings{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("GET", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
return resp, nil
}
// Patch patch Instance settings
func (c *instanceSettingsRESTClient) Patch(ctx context.Context, req *computepb.PatchInstanceSettingRequest, opts ...gax.CallOption) (*Operation, error) {
m := protojson.MarshalOptions{AllowPartial: true}
body := req.GetInstanceSettingsResource()
jsonReq, err := m.Marshal(body)
if err != nil {
return nil, err
}
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/instanceSettings", req.GetProject(), req.GetZone())
params := url.Values{}
if req != nil && req.RequestId != nil {
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
}
if req != nil && req.UpdateMask != nil {
params.Add("updateMask", fmt.Sprintf("%v", req.GetUpdateMask()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).Patch[0:len((*c.CallOptions).Patch):len((*c.CallOptions).Patch)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.Operation{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq))
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
op := &Operation{
&zoneOperationsHandle{
c: c.operationClient,
proto: resp,
project: req.GetProject(),
zone: req.GetZone(),
},
}
return op, nil
}

View file

@ -53,6 +53,7 @@ type NodeGroupsCallOptions struct {
List []gax.CallOption
ListNodes []gax.CallOption
Patch []gax.CallOption
PerformMaintenance []gax.CallOption
SetIamPolicy []gax.CallOption
SetNodeTemplate []gax.CallOption
SimulateMaintenanceEvent []gax.CallOption
@ -127,6 +128,9 @@ func defaultNodeGroupsRESTCallOptions() *NodeGroupsCallOptions {
Patch: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
PerformMaintenance: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
SetIamPolicy: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
@ -157,6 +161,7 @@ type internalNodeGroupsClient interface {
List(context.Context, *computepb.ListNodeGroupsRequest, ...gax.CallOption) *NodeGroupIterator
ListNodes(context.Context, *computepb.ListNodesNodeGroupsRequest, ...gax.CallOption) *NodeGroupNodeIterator
Patch(context.Context, *computepb.PatchNodeGroupRequest, ...gax.CallOption) (*Operation, error)
PerformMaintenance(context.Context, *computepb.PerformMaintenanceNodeGroupRequest, ...gax.CallOption) (*Operation, error)
SetIamPolicy(context.Context, *computepb.SetIamPolicyNodeGroupRequest, ...gax.CallOption) (*computepb.Policy, error)
SetNodeTemplate(context.Context, *computepb.SetNodeTemplateNodeGroupRequest, ...gax.CallOption) (*Operation, error)
SimulateMaintenanceEvent(context.Context, *computepb.SimulateMaintenanceEventNodeGroupRequest, ...gax.CallOption) (*Operation, error)
@ -248,6 +253,11 @@ func (c *NodeGroupsClient) Patch(ctx context.Context, req *computepb.PatchNodeGr
return c.internalClient.Patch(ctx, req, opts...)
}
// PerformMaintenance perform maintenance on a subset of nodes in the node group.
func (c *NodeGroupsClient) PerformMaintenance(ctx context.Context, req *computepb.PerformMaintenanceNodeGroupRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.PerformMaintenance(ctx, req, opts...)
}
// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
func (c *NodeGroupsClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyNodeGroupRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
return c.internalClient.SetIamPolicy(ctx, req, opts...)
@ -1155,6 +1165,83 @@ func (c *nodeGroupsRESTClient) Patch(ctx context.Context, req *computepb.PatchNo
return op, nil
}
// PerformMaintenance perform maintenance on a subset of nodes in the node group.
func (c *nodeGroupsRESTClient) PerformMaintenance(ctx context.Context, req *computepb.PerformMaintenanceNodeGroupRequest, opts ...gax.CallOption) (*Operation, error) {
m := protojson.MarshalOptions{AllowPartial: true}
body := req.GetNodeGroupsPerformMaintenanceRequestResource()
jsonReq, err := m.Marshal(body)
if err != nil {
return nil, err
}
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/nodeGroups/%v/performMaintenance", req.GetProject(), req.GetZone(), req.GetNodeGroup())
params := url.Values{}
if req != nil && req.RequestId != nil {
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "node_group", url.QueryEscape(req.GetNodeGroup()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).PerformMaintenance[0:len((*c.CallOptions).PerformMaintenance):len((*c.CallOptions).PerformMaintenance)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.Operation{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq))
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
op := &Operation{
&zoneOperationsHandle{
c: c.operationClient,
proto: resp,
project: req.GetProject(),
zone: req.GetZone(),
},
}
return op, nil
}
// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
func (c *nodeGroupsRESTClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyNodeGroupRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
m := protojson.MarshalOptions{AllowPartial: true}

View file

@ -0,0 +1,482 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package compute
import (
"context"
"fmt"
"io"
"math"
"net/http"
"net/url"
"sort"
"time"
computepb "cloud.google.com/go/compute/apiv1/computepb"
gax "github.com/googleapis/gax-go/v2"
"google.golang.org/api/googleapi"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/api/option/internaloption"
httptransport "google.golang.org/api/transport/http"
"google.golang.org/grpc"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
)
var newStoragePoolTypesClientHook clientHook
// StoragePoolTypesCallOptions contains the retry settings for each method of StoragePoolTypesClient.
type StoragePoolTypesCallOptions struct {
AggregatedList []gax.CallOption
Get []gax.CallOption
List []gax.CallOption
}
func defaultStoragePoolTypesRESTCallOptions() *StoragePoolTypesCallOptions {
return &StoragePoolTypesCallOptions{
AggregatedList: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
gax.WithRetry(func() gax.Retryer {
return gax.OnHTTPCodes(gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
Multiplier: 1.30,
},
http.StatusGatewayTimeout,
http.StatusServiceUnavailable)
}),
},
Get: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
gax.WithRetry(func() gax.Retryer {
return gax.OnHTTPCodes(gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
Multiplier: 1.30,
},
http.StatusGatewayTimeout,
http.StatusServiceUnavailable)
}),
},
List: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
gax.WithRetry(func() gax.Retryer {
return gax.OnHTTPCodes(gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
Multiplier: 1.30,
},
http.StatusGatewayTimeout,
http.StatusServiceUnavailable)
}),
},
}
}
// internalStoragePoolTypesClient is an interface that defines the methods available from Google Compute Engine API.
type internalStoragePoolTypesClient interface {
Close() error
setGoogleClientInfo(...string)
Connection() *grpc.ClientConn
AggregatedList(context.Context, *computepb.AggregatedListStoragePoolTypesRequest, ...gax.CallOption) *StoragePoolTypesScopedListPairIterator
Get(context.Context, *computepb.GetStoragePoolTypeRequest, ...gax.CallOption) (*computepb.StoragePoolType, error)
List(context.Context, *computepb.ListStoragePoolTypesRequest, ...gax.CallOption) *StoragePoolTypeIterator
}
// StoragePoolTypesClient is a client for interacting with Google Compute Engine API.
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
//
// The StoragePoolTypes API.
type StoragePoolTypesClient struct {
// The internal transport-dependent client.
internalClient internalStoragePoolTypesClient
// The call options for this service.
CallOptions *StoragePoolTypesCallOptions
}
// Wrapper methods routed to the internal client.
// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *StoragePoolTypesClient) Close() error {
return c.internalClient.Close()
}
// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *StoragePoolTypesClient) setGoogleClientInfo(keyval ...string) {
c.internalClient.setGoogleClientInfo(keyval...)
}
// Connection returns a connection to the API service.
//
// Deprecated: Connections are now pooled so this method does not always
// return the same resource.
func (c *StoragePoolTypesClient) Connection() *grpc.ClientConn {
return c.internalClient.Connection()
}
// AggregatedList retrieves an aggregated list of storage pool types. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
func (c *StoragePoolTypesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListStoragePoolTypesRequest, opts ...gax.CallOption) *StoragePoolTypesScopedListPairIterator {
return c.internalClient.AggregatedList(ctx, req, opts...)
}
// Get returns the specified storage pool type.
func (c *StoragePoolTypesClient) Get(ctx context.Context, req *computepb.GetStoragePoolTypeRequest, opts ...gax.CallOption) (*computepb.StoragePoolType, error) {
return c.internalClient.Get(ctx, req, opts...)
}
// List retrieves a list of storage pool types available to the specified project.
func (c *StoragePoolTypesClient) List(ctx context.Context, req *computepb.ListStoragePoolTypesRequest, opts ...gax.CallOption) *StoragePoolTypeIterator {
return c.internalClient.List(ctx, req, opts...)
}
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
type storagePoolTypesRESTClient struct {
// The http endpoint to connect to.
endpoint string
// The http client.
httpClient *http.Client
// The x-goog-* headers to be sent with each request.
xGoogHeaders []string
// Points back to the CallOptions field of the containing StoragePoolTypesClient
CallOptions **StoragePoolTypesCallOptions
}
// NewStoragePoolTypesRESTClient creates a new storage pool types rest client.
//
// The StoragePoolTypes API.
func NewStoragePoolTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*StoragePoolTypesClient, error) {
clientOpts := append(defaultStoragePoolTypesRESTClientOptions(), opts...)
httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)
if err != nil {
return nil, err
}
callOpts := defaultStoragePoolTypesRESTCallOptions()
c := &storagePoolTypesRESTClient{
endpoint: endpoint,
httpClient: httpClient,
CallOptions: &callOpts,
}
c.setGoogleClientInfo()
return &StoragePoolTypesClient{internalClient: c, CallOptions: callOpts}, nil
}
func defaultStoragePoolTypesRESTClientOptions() []option.ClientOption {
return []option.ClientOption{
internaloption.WithDefaultEndpoint("https://compute.googleapis.com"),
internaloption.WithDefaultEndpointTemplate("https://compute.UNIVERSE_DOMAIN"),
internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"),
internaloption.WithDefaultUniverseDomain("googleapis.com"),
internaloption.WithDefaultAudience("https://compute.googleapis.com/"),
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
}
}
// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *storagePoolTypesRESTClient) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN")
c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)}
}
// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *storagePoolTypesRESTClient) Close() error {
// Replace httpClient with nil to force cleanup.
c.httpClient = nil
return nil
}
// Connection returns a connection to the API service.
//
// Deprecated: This method always returns nil.
func (c *storagePoolTypesRESTClient) Connection() *grpc.ClientConn {
return nil
}
// AggregatedList retrieves an aggregated list of storage pool types. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
func (c *storagePoolTypesRESTClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListStoragePoolTypesRequest, opts ...gax.CallOption) *StoragePoolTypesScopedListPairIterator {
it := &StoragePoolTypesScopedListPairIterator{}
req = proto.Clone(req).(*computepb.AggregatedListStoragePoolTypesRequest)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
it.InternalFetch = func(pageSize int, pageToken string) ([]StoragePoolTypesScopedListPair, string, error) {
resp := &computepb.StoragePoolTypeAggregatedList{}
if pageToken != "" {
req.PageToken = proto.String(pageToken)
}
if pageSize > math.MaxInt32 {
req.MaxResults = proto.Uint32(math.MaxInt32)
} else if pageSize != 0 {
req.MaxResults = proto.Uint32(uint32(pageSize))
}
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, "", err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/aggregated/storagePoolTypes", req.GetProject())
params := url.Values{}
if req != nil && req.Filter != nil {
params.Add("filter", fmt.Sprintf("%v", req.GetFilter()))
}
if req != nil && req.IncludeAllScopes != nil {
params.Add("includeAllScopes", fmt.Sprintf("%v", req.GetIncludeAllScopes()))
}
if req != nil && req.MaxResults != nil {
params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults()))
}
if req != nil && req.OrderBy != nil {
params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy()))
}
if req != nil && req.PageToken != nil {
params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken()))
}
if req != nil && req.ReturnPartialSuccess != nil {
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
}
if req != nil && req.ServiceProjectNumber != nil {
params.Add("serviceProjectNumber", fmt.Sprintf("%v", req.GetServiceProjectNumber()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := append(c.xGoogHeaders, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("GET", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, "", e
}
it.Response = resp
elems := make([]StoragePoolTypesScopedListPair, 0, len(resp.GetItems()))
for k, v := range resp.GetItems() {
elems = append(elems, StoragePoolTypesScopedListPair{k, v})
}
sort.Slice(elems, func(i, j int) bool { return elems[i].Key < elems[j].Key })
return elems, resp.GetNextPageToken(), nil
}
fetch := func(pageSize int, pageToken string) (string, error) {
items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
if err != nil {
return "", err
}
it.items = append(it.items, items...)
return nextPageToken, nil
}
it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
it.pageInfo.MaxSize = int(req.GetMaxResults())
it.pageInfo.Token = req.GetPageToken()
return it
}
// Get returns the specified storage pool type.
func (c *storagePoolTypesRESTClient) Get(ctx context.Context, req *computepb.GetStoragePoolTypeRequest, opts ...gax.CallOption) (*computepb.StoragePoolType, error) {
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/storagePoolTypes/%v", req.GetProject(), req.GetZone(), req.GetStoragePoolType())
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "storage_pool_type", url.QueryEscape(req.GetStoragePoolType()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).Get[0:len((*c.CallOptions).Get):len((*c.CallOptions).Get)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.StoragePoolType{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("GET", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
return resp, nil
}
// List retrieves a list of storage pool types available to the specified project.
func (c *storagePoolTypesRESTClient) List(ctx context.Context, req *computepb.ListStoragePoolTypesRequest, opts ...gax.CallOption) *StoragePoolTypeIterator {
it := &StoragePoolTypeIterator{}
req = proto.Clone(req).(*computepb.ListStoragePoolTypesRequest)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
it.InternalFetch = func(pageSize int, pageToken string) ([]*computepb.StoragePoolType, string, error) {
resp := &computepb.StoragePoolTypeList{}
if pageToken != "" {
req.PageToken = proto.String(pageToken)
}
if pageSize > math.MaxInt32 {
req.MaxResults = proto.Uint32(math.MaxInt32)
} else if pageSize != 0 {
req.MaxResults = proto.Uint32(uint32(pageSize))
}
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, "", err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/storagePoolTypes", req.GetProject(), req.GetZone())
params := url.Values{}
if req != nil && req.Filter != nil {
params.Add("filter", fmt.Sprintf("%v", req.GetFilter()))
}
if req != nil && req.MaxResults != nil {
params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults()))
}
if req != nil && req.OrderBy != nil {
params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy()))
}
if req != nil && req.PageToken != nil {
params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken()))
}
if req != nil && req.ReturnPartialSuccess != nil {
params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := append(c.xGoogHeaders, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("GET", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, "", e
}
it.Response = resp
return resp.GetItems(), resp.GetNextPageToken(), nil
}
fetch := func(pageSize int, pageToken string) (string, error) {
items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
if err != nil {
return "", err
}
it.items = append(it.items, items...)
return nextPageToken, nil
}
it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
it.pageInfo.MaxSize = int(req.GetMaxResults())
it.pageInfo.Token = req.GetPageToken()
return it
}

File diff suppressed because it is too large Load diff

View file

@ -15,4 +15,4 @@
package internal
// Version is the current tagged release of the library.
const Version = "1.25.1"
const Version = "1.26.0"

View file

@ -199,6 +199,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/apphub/apiv1": {
"api_shortname": "apphub",
"distribution_name": "cloud.google.com/go/apphub/apiv1",
"description": "App Hub API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/apphub/latest/apiv1",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/apps/events/subscriptions/apiv1": {
"api_shortname": "workspaceevents",
"distribution_name": "cloud.google.com/go/apps/events/subscriptions/apiv1",
@ -659,6 +669,26 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/cloudcontrolspartner/apiv1": {
"api_shortname": "cloudcontrolspartner",
"distribution_name": "cloud.google.com/go/cloudcontrolspartner/apiv1",
"description": "Cloud Controls Partner API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/cloudcontrolspartner/latest/apiv1",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/cloudcontrolspartner/apiv1beta": {
"api_shortname": "cloudcontrolspartner",
"distribution_name": "cloud.google.com/go/cloudcontrolspartner/apiv1beta",
"description": "Cloud Controls Partner API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/cloudcontrolspartner/latest/apiv1beta",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/clouddms/apiv1": {
"api_shortname": "datamigration",
"distribution_name": "cloud.google.com/go/clouddms/apiv1",
@ -1052,7 +1082,7 @@
"cloud.google.com/go/dlp/apiv2": {
"api_shortname": "dlp",
"distribution_name": "cloud.google.com/go/dlp/apiv2",
"description": "Cloud Data Loss Prevention (DLP)",
"description": "Sensitive Data Protection (DLP)",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/dlp/latest/apiv2",
@ -2109,6 +2139,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/secretmanager/apiv1beta2": {
"api_shortname": "secretmanager",
"distribution_name": "cloud.google.com/go/secretmanager/apiv1beta2",
"description": "Secret Manager API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/secretmanager/latest/apiv1beta2",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/securesourcemanager/apiv1": {
"api_shortname": "securesourcemanager",
"distribution_name": "cloud.google.com/go/securesourcemanager/apiv1",
@ -2169,6 +2209,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/securitycenter/apiv2": {
"api_shortname": "securitycenter",
"distribution_name": "cloud.google.com/go/securitycenter/apiv2",
"description": "Security Command Center API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/securitycenter/latest/apiv2",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/securitycenter/settings/apiv1beta1": {
"api_shortname": "securitycenter",
"distribution_name": "cloud.google.com/go/securitycenter/settings/apiv1beta1",
@ -2379,6 +2429,16 @@
"release_level": "stable",
"library_type": "GAPIC_MANUAL"
},
"cloud.google.com/go/storage/control/apiv2": {
"api_shortname": "storage",
"distribution_name": "cloud.google.com/go/storage/control/apiv2",
"description": "Cloud Storage API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest/control/apiv2",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/storage/internal/apiv2": {
"api_shortname": "storage",
"distribution_name": "cloud.google.com/go/storage/internal/apiv2",

View file

@ -1,5 +1,14 @@
# Release History
## 1.5.2 (2024-04-09)
### Bugs Fixed
* `ManagedIdentityCredential` now specifies resource IDs correctly for Azure Container Instances
### Other Changes
* Restored v1.4.0 error behavior for empty tenant IDs
* Upgraded dependencies
## 1.5.1 (2024-01-17)
### Bugs Fixed

View file

@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/azidentity",
"Tag": "go/azidentity_db4a26f583"
"Tag": "go/azidentity_98074050dc"
}

View file

@ -121,6 +121,9 @@ func alphanumeric(r rune) bool {
}
func validTenantID(tenantID string) bool {
if len(tenantID) < 1 {
return false
}
for _, r := range tenantID {
if !(alphanumeric(r) || r == '.' || r == '-') {
return false

View file

@ -3,8 +3,6 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0-beta.1/go.mod h1:3Ug6Qzto9an
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0/go.mod h1:uReU2sSxZExRPBAg3qKzmAucSi51+SP1OhohieR821Q=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@ -14,6 +12,7 @@ github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
@ -23,6 +22,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@ -33,6 +34,7 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

View file

@ -34,14 +34,14 @@ const (
identityServerThumbprint = "IDENTITY_SERVER_THUMBPRINT"
headerMetadata = "Metadata"
imdsEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token"
miResID = "mi_res_id"
msiEndpoint = "MSI_ENDPOINT"
msiResID = "msi_res_id"
msiSecret = "MSI_SECRET"
imdsAPIVersion = "2018-02-01"
azureArcAPIVersion = "2019-08-15"
qpClientID = "client_id"
serviceFabricAPIVersion = "2019-07-01-preview"
qpClientID = "client_id"
qpResID = "mi_res_id"
)
type msiType int
@ -286,7 +286,7 @@ func (c *managedIdentityClient) createIMDSAuthRequest(ctx context.Context, id Ma
q.Add("resource", strings.Join(scopes, " "))
if id != nil {
if id.idKind() == miResourceID {
q.Add(qpResID, id.String())
q.Add(msiResID, id.String())
} else {
q.Add(qpClientID, id.String())
}
@ -306,7 +306,7 @@ func (c *managedIdentityClient) createAppServiceAuthRequest(ctx context.Context,
q.Add("resource", scopes[0])
if id != nil {
if id.idKind() == miResourceID {
q.Add(qpResID, id.String())
q.Add(miResID, id.String())
} else {
q.Add(qpClientID, id.String())
}
@ -329,7 +329,7 @@ func (c *managedIdentityClient) createAzureMLAuthRequest(ctx context.Context, id
if id.idKind() == miResourceID {
log.Write(EventAuthentication, "WARNING: Azure ML doesn't support specifying a managed identity by resource ID")
q.Set("clientid", "")
q.Set(qpResID, id.String())
q.Set(miResID, id.String())
} else {
q.Set("clientid", id.String())
}
@ -351,7 +351,7 @@ func (c *managedIdentityClient) createServiceFabricAuthRequest(ctx context.Conte
if id != nil {
log.Write(EventAuthentication, "WARNING: Service Fabric doesn't support selecting a user-assigned identity at runtime")
if id.idKind() == miResourceID {
q.Add(qpResID, id.String())
q.Add(miResID, id.String())
} else {
q.Add(qpClientID, id.String())
}
@ -411,7 +411,7 @@ func (c *managedIdentityClient) createAzureArcAuthRequest(ctx context.Context, i
if id != nil {
log.Write(EventAuthentication, "WARNING: Azure Arc doesn't support user-assigned managed identities")
if id.idKind() == miResourceID {
q.Add(qpResID, id.String())
q.Add(miResID, id.String())
} else {
q.Add(qpClientID, id.String())
}
@ -437,7 +437,7 @@ func (c *managedIdentityClient) createCloudShellAuthRequest(ctx context.Context,
log.Write(EventAuthentication, "WARNING: Cloud Shell doesn't support user-assigned managed identities")
q := request.Raw().URL.Query()
if id.idKind() == miResourceID {
q.Add(qpResID, id.String())
q.Add(miResID, id.String())
} else {
q.Add(qpClientID, id.String())
}

View file

@ -14,5 +14,5 @@ const (
module = "github.com/Azure/azure-sdk-for-go/sdk/" + component
// Version is the semantic version (see http://semver.org) of this module.
version = "v1.5.1"
version = "v1.5.2"
)

View file

@ -1,5 +1,32 @@
# Release History
## 5.7.0 (2024-04-26)
### Features Added
- New value `DiffDiskPlacementNvmeDisk` added to enum type `DiffDiskPlacement`
- New value `DiskCreateOptionTypesCopy`, `DiskCreateOptionTypesRestore` added to enum type `DiskCreateOptionTypes`
- New enum type `ResourceIDOptionsForGetCapacityReservationGroups` with values `ResourceIDOptionsForGetCapacityReservationGroupsAll`, `ResourceIDOptionsForGetCapacityReservationGroupsCreatedInSubscription`, `ResourceIDOptionsForGetCapacityReservationGroupsSharedWithSubscription`
- New struct `EventGridAndResourceGraph`
- New struct `ScheduledEventsAdditionalPublishingTargets`
- New struct `ScheduledEventsPolicy`
- New struct `UserInitiatedReboot`
- New struct `UserInitiatedRedeploy`
- New field `ResourceIDsOnly` in struct `CapacityReservationGroupsClientListBySubscriptionOptions`
- New field `SourceResource` in struct `DataDisk`
- New field `Caching`, `DeleteOption`, `DiskEncryptionSet`, `WriteAcceleratorEnabled` in struct `DataDisksToAttach`
- New field `ScheduledEventsPolicy` in struct `VirtualMachineProperties`
- New field `ScheduledEventsPolicy` in struct `VirtualMachineScaleSetProperties`
- New field `ForceUpdateOSDiskForEphemeral` in struct `VirtualMachineScaleSetReimageParameters`
- New field `DiffDiskSettings` in struct `VirtualMachineScaleSetUpdateOSDisk`
- New field `ForceUpdateOSDiskForEphemeral` in struct `VirtualMachineScaleSetVMReimageParameters`
## 5.6.0 (2024-03-22)
### Features Added
- New field `VirtualMachineID` in struct `GalleryArtifactVersionFullSource`
## 5.5.0 (2024-01-26)
### Features Added

View file

@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/resourcemanager/compute/armcompute",
"Tag": "go/resourcemanager/compute/armcompute_444bc7d3bc"
"Tag": "go/resourcemanager/compute/armcompute_6e7bd6d107"
}

View file

@ -5,9 +5,9 @@
``` yaml
azure-arm: true
require:
- https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/compute/resource-manager/readme.md
- https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/compute/resource-manager/readme.go.md
- https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/compute/resource-manager/readme.md
- https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/compute/resource-manager/readme.go.md
license-header: MICROSOFT_MIT_NO_VERSION
module-version: 5.5.0
tag: package-2023-10-02
module-version: 5.7.0
tag: package-2024-03-01
```

View file

@ -47,7 +47,7 @@ func NewAvailabilitySetsClient(subscriptionID string, credential azcore.TokenCre
// CreateOrUpdate - Create or update an availability set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - availabilitySetName - The name of the availability set.
// - parameters - Parameters supplied to the Create Availability Set operation.
@ -95,7 +95,7 @@ func (client *AvailabilitySetsClient) createOrUpdateCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -116,7 +116,7 @@ func (client *AvailabilitySetsClient) createOrUpdateHandleResponse(resp *http.Re
// Delete - Delete an availability set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - availabilitySetName - The name of the availability set.
// - options - AvailabilitySetsClientDeleteOptions contains the optional parameters for the AvailabilitySetsClient.Delete method.
@ -161,7 +161,7 @@ func (client *AvailabilitySetsClient) deleteCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -170,7 +170,7 @@ func (client *AvailabilitySetsClient) deleteCreateRequest(ctx context.Context, r
// Get - Retrieves information about an availability set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - availabilitySetName - The name of the availability set.
// - options - AvailabilitySetsClientGetOptions contains the optional parameters for the AvailabilitySetsClient.Get method.
@ -216,7 +216,7 @@ func (client *AvailabilitySetsClient) getCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -233,7 +233,7 @@ func (client *AvailabilitySetsClient) getHandleResponse(resp *http.Response) (Av
// NewListPager - Lists all availability sets in a resource group.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - AvailabilitySetsClientListOptions contains the optional parameters for the AvailabilitySetsClient.NewListPager
// method.
@ -276,7 +276,7 @@ func (client *AvailabilitySetsClient) listCreateRequest(ctx context.Context, res
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -294,7 +294,7 @@ func (client *AvailabilitySetsClient) listHandleResponse(resp *http.Response) (A
// NewListAvailableSizesPager - Lists all available virtual machine sizes that can be used to create a new virtual machine
// in an existing availability set.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - availabilitySetName - The name of the availability set.
// - options - AvailabilitySetsClientListAvailableSizesOptions contains the optional parameters for the AvailabilitySetsClient.NewListAvailableSizesPager
@ -343,7 +343,7 @@ func (client *AvailabilitySetsClient) listAvailableSizesCreateRequest(ctx contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -360,7 +360,7 @@ func (client *AvailabilitySetsClient) listAvailableSizesHandleResponse(resp *htt
// NewListBySubscriptionPager - Lists all availability sets in a subscription.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - AvailabilitySetsClientListBySubscriptionOptions contains the optional parameters for the AvailabilitySetsClient.NewListBySubscriptionPager
// method.
func (client *AvailabilitySetsClient) NewListBySubscriptionPager(options *AvailabilitySetsClientListBySubscriptionOptions) *runtime.Pager[AvailabilitySetsClientListBySubscriptionResponse] {
@ -398,10 +398,10 @@ func (client *AvailabilitySetsClient) listBySubscriptionCreateRequest(ctx contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -419,7 +419,7 @@ func (client *AvailabilitySetsClient) listBySubscriptionHandleResponse(resp *htt
// Update - Update an availability set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - availabilitySetName - The name of the availability set.
// - parameters - Parameters supplied to the Update Availability Set operation.
@ -466,7 +466,7 @@ func (client *AvailabilitySetsClient) updateCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -49,7 +49,7 @@ func NewCapacityReservationGroupsClient(subscriptionID string, credential azcore
// https://aka.ms/CapacityReservation for more details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - parameters - Parameters supplied to the Create capacity reservation Group.
@ -97,7 +97,7 @@ func (client *CapacityReservationGroupsClient) createOrUpdateCreateRequest(ctx c
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -120,7 +120,7 @@ func (client *CapacityReservationGroupsClient) createOrUpdateHandleResponse(resp
// the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - options - CapacityReservationGroupsClientDeleteOptions contains the optional parameters for the CapacityReservationGroupsClient.Delete
@ -166,7 +166,7 @@ func (client *CapacityReservationGroupsClient) deleteCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -175,7 +175,7 @@ func (client *CapacityReservationGroupsClient) deleteCreateRequest(ctx context.C
// Get - The operation that retrieves information about a capacity reservation group.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - options - CapacityReservationGroupsClientGetOptions contains the optional parameters for the CapacityReservationGroupsClient.Get
@ -225,7 +225,7 @@ func (client *CapacityReservationGroupsClient) getCreateRequest(ctx context.Cont
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -243,7 +243,7 @@ func (client *CapacityReservationGroupsClient) getHandleResponse(resp *http.Resp
// NewListByResourceGroupPager - Lists all of the capacity reservation groups in the specified resource group. Use the nextLink
// property in the response to get the next page of capacity reservation groups.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - CapacityReservationGroupsClientListByResourceGroupOptions contains the optional parameters for the CapacityReservationGroupsClient.NewListByResourceGroupPager
// method.
@ -286,10 +286,10 @@ func (client *CapacityReservationGroupsClient) listByResourceGroupCreateRequest(
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -307,7 +307,7 @@ func (client *CapacityReservationGroupsClient) listByResourceGroupHandleResponse
// NewListBySubscriptionPager - Lists all of the capacity reservation groups in the subscription. Use the nextLink property
// in the response to get the next page of capacity reservation groups.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - CapacityReservationGroupsClientListBySubscriptionOptions contains the optional parameters for the CapacityReservationGroupsClient.NewListBySubscriptionPager
// method.
func (client *CapacityReservationGroupsClient) NewListBySubscriptionPager(options *CapacityReservationGroupsClientListBySubscriptionOptions) *runtime.Pager[CapacityReservationGroupsClientListBySubscriptionResponse] {
@ -345,10 +345,13 @@ func (client *CapacityReservationGroupsClient) listBySubscriptionCreateRequest(c
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.ResourceIDsOnly != nil {
reqQP.Set("resourceIdsOnly", string(*options.ResourceIDsOnly))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -367,7 +370,7 @@ func (client *CapacityReservationGroupsClient) listBySubscriptionHandleResponse(
// sharing profile may be modified.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - parameters - Parameters supplied to the Update capacity reservation Group operation.
@ -415,7 +418,7 @@ func (client *CapacityReservationGroupsClient) updateCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -49,7 +49,7 @@ func NewCapacityReservationsClient(subscriptionID string, credential azcore.Toke
// details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - capacityReservationName - The name of the capacity reservation.
@ -78,7 +78,7 @@ func (client *CapacityReservationsClient) BeginCreateOrUpdate(ctx context.Contex
// details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *CapacityReservationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation, options *CapacityReservationsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "CapacityReservationsClient.BeginCreateOrUpdate"
@ -124,7 +124,7 @@ func (client *CapacityReservationsClient) createOrUpdateCreateRequest(ctx contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -138,7 +138,7 @@ func (client *CapacityReservationsClient) createOrUpdateCreateRequest(ctx contex
// https://aka.ms/CapacityReservation for more details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - capacityReservationName - The name of the capacity reservation.
@ -166,7 +166,7 @@ func (client *CapacityReservationsClient) BeginDelete(ctx context.Context, resou
// https://aka.ms/CapacityReservation for more details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *CapacityReservationsClient) deleteOperation(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "CapacityReservationsClient.BeginDelete"
@ -212,7 +212,7 @@ func (client *CapacityReservationsClient) deleteCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -221,7 +221,7 @@ func (client *CapacityReservationsClient) deleteCreateRequest(ctx context.Contex
// Get - The operation that retrieves information about the capacity reservation.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - capacityReservationName - The name of the capacity reservation.
@ -276,7 +276,7 @@ func (client *CapacityReservationsClient) getCreateRequest(ctx context.Context,
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -294,7 +294,7 @@ func (client *CapacityReservationsClient) getHandleResponse(resp *http.Response)
// NewListByCapacityReservationGroupPager - Lists all of the capacity reservations in the specified capacity reservation group.
// Use the nextLink property in the response to get the next page of capacity reservations.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - options - CapacityReservationsClientListByCapacityReservationGroupOptions contains the optional parameters for the CapacityReservationsClient.NewListByCapacityReservationGroupPager
@ -342,7 +342,7 @@ func (client *CapacityReservationsClient) listByCapacityReservationGroupCreateRe
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -360,7 +360,7 @@ func (client *CapacityReservationsClient) listByCapacityReservationGroupHandleRe
// BeginUpdate - The operation to update a capacity reservation.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - capacityReservationGroupName - The name of the capacity reservation group.
// - capacityReservationName - The name of the capacity reservation.
@ -387,7 +387,7 @@ func (client *CapacityReservationsClient) BeginUpdate(ctx context.Context, resou
// Update - The operation to update a capacity reservation.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *CapacityReservationsClient) update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate, options *CapacityReservationsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "CapacityReservationsClient.BeginUpdate"
@ -433,7 +433,7 @@ func (client *CapacityReservationsClient) updateCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -21,8 +21,8 @@ pr:
include:
- sdk/resourcemanager/compute/armcompute/
stages:
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
extends:
template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
parameters:
IncludeRelease: true
ServiceDirectory: 'resourcemanager/compute/armcompute'

View file

@ -17,8 +17,7 @@ import (
// Don't use this type directly, use NewClientFactory instead.
type ClientFactory struct {
subscriptionID string
credential azcore.TokenCredential
options *arm.ClientOptions
internal *arm.Client
}
// NewClientFactory creates a new instance of ClientFactory with the specified values.
@ -28,306 +27,403 @@ type ClientFactory struct {
// - 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, moduleVersion, credential, options)
internal, err := arm.NewClient(moduleName, moduleVersion, credential, options)
if err != nil {
return nil, err
}
return &ClientFactory{
subscriptionID: subscriptionID, credential: credential,
options: options.Clone(),
subscriptionID: subscriptionID,
internal: internal,
}, nil
}
// NewAvailabilitySetsClient creates a new instance of AvailabilitySetsClient.
func (c *ClientFactory) NewAvailabilitySetsClient() *AvailabilitySetsClient {
subClient, _ := NewAvailabilitySetsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &AvailabilitySetsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCapacityReservationGroupsClient creates a new instance of CapacityReservationGroupsClient.
func (c *ClientFactory) NewCapacityReservationGroupsClient() *CapacityReservationGroupsClient {
subClient, _ := NewCapacityReservationGroupsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CapacityReservationGroupsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCapacityReservationsClient creates a new instance of CapacityReservationsClient.
func (c *ClientFactory) NewCapacityReservationsClient() *CapacityReservationsClient {
subClient, _ := NewCapacityReservationsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CapacityReservationsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCloudServiceOperatingSystemsClient creates a new instance of CloudServiceOperatingSystemsClient.
func (c *ClientFactory) NewCloudServiceOperatingSystemsClient() *CloudServiceOperatingSystemsClient {
subClient, _ := NewCloudServiceOperatingSystemsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CloudServiceOperatingSystemsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCloudServiceRoleInstancesClient creates a new instance of CloudServiceRoleInstancesClient.
func (c *ClientFactory) NewCloudServiceRoleInstancesClient() *CloudServiceRoleInstancesClient {
subClient, _ := NewCloudServiceRoleInstancesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CloudServiceRoleInstancesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCloudServiceRolesClient creates a new instance of CloudServiceRolesClient.
func (c *ClientFactory) NewCloudServiceRolesClient() *CloudServiceRolesClient {
subClient, _ := NewCloudServiceRolesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CloudServiceRolesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCloudServicesClient creates a new instance of CloudServicesClient.
func (c *ClientFactory) NewCloudServicesClient() *CloudServicesClient {
subClient, _ := NewCloudServicesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CloudServicesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCloudServicesUpdateDomainClient creates a new instance of CloudServicesUpdateDomainClient.
func (c *ClientFactory) NewCloudServicesUpdateDomainClient() *CloudServicesUpdateDomainClient {
subClient, _ := NewCloudServicesUpdateDomainClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CloudServicesUpdateDomainClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCommunityGalleriesClient creates a new instance of CommunityGalleriesClient.
func (c *ClientFactory) NewCommunityGalleriesClient() *CommunityGalleriesClient {
subClient, _ := NewCommunityGalleriesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CommunityGalleriesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCommunityGalleryImageVersionsClient creates a new instance of CommunityGalleryImageVersionsClient.
func (c *ClientFactory) NewCommunityGalleryImageVersionsClient() *CommunityGalleryImageVersionsClient {
subClient, _ := NewCommunityGalleryImageVersionsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CommunityGalleryImageVersionsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewCommunityGalleryImagesClient creates a new instance of CommunityGalleryImagesClient.
func (c *ClientFactory) NewCommunityGalleryImagesClient() *CommunityGalleryImagesClient {
subClient, _ := NewCommunityGalleryImagesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &CommunityGalleryImagesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewDedicatedHostGroupsClient creates a new instance of DedicatedHostGroupsClient.
func (c *ClientFactory) NewDedicatedHostGroupsClient() *DedicatedHostGroupsClient {
subClient, _ := NewDedicatedHostGroupsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &DedicatedHostGroupsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewDedicatedHostsClient creates a new instance of DedicatedHostsClient.
func (c *ClientFactory) NewDedicatedHostsClient() *DedicatedHostsClient {
subClient, _ := NewDedicatedHostsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &DedicatedHostsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewDiskAccessesClient creates a new instance of DiskAccessesClient.
func (c *ClientFactory) NewDiskAccessesClient() *DiskAccessesClient {
subClient, _ := NewDiskAccessesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &DiskAccessesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewDiskEncryptionSetsClient creates a new instance of DiskEncryptionSetsClient.
func (c *ClientFactory) NewDiskEncryptionSetsClient() *DiskEncryptionSetsClient {
subClient, _ := NewDiskEncryptionSetsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &DiskEncryptionSetsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewDiskRestorePointClient creates a new instance of DiskRestorePointClient.
func (c *ClientFactory) NewDiskRestorePointClient() *DiskRestorePointClient {
subClient, _ := NewDiskRestorePointClient(c.subscriptionID, c.credential, c.options)
return subClient
return &DiskRestorePointClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewDisksClient creates a new instance of DisksClient.
func (c *ClientFactory) NewDisksClient() *DisksClient {
subClient, _ := NewDisksClient(c.subscriptionID, c.credential, c.options)
return subClient
return &DisksClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewGalleriesClient creates a new instance of GalleriesClient.
func (c *ClientFactory) NewGalleriesClient() *GalleriesClient {
subClient, _ := NewGalleriesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &GalleriesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewGalleryApplicationVersionsClient creates a new instance of GalleryApplicationVersionsClient.
func (c *ClientFactory) NewGalleryApplicationVersionsClient() *GalleryApplicationVersionsClient {
subClient, _ := NewGalleryApplicationVersionsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &GalleryApplicationVersionsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewGalleryApplicationsClient creates a new instance of GalleryApplicationsClient.
func (c *ClientFactory) NewGalleryApplicationsClient() *GalleryApplicationsClient {
subClient, _ := NewGalleryApplicationsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &GalleryApplicationsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewGalleryImageVersionsClient creates a new instance of GalleryImageVersionsClient.
func (c *ClientFactory) NewGalleryImageVersionsClient() *GalleryImageVersionsClient {
subClient, _ := NewGalleryImageVersionsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &GalleryImageVersionsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewGalleryImagesClient creates a new instance of GalleryImagesClient.
func (c *ClientFactory) NewGalleryImagesClient() *GalleryImagesClient {
subClient, _ := NewGalleryImagesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &GalleryImagesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewGallerySharingProfileClient creates a new instance of GallerySharingProfileClient.
func (c *ClientFactory) NewGallerySharingProfileClient() *GallerySharingProfileClient {
subClient, _ := NewGallerySharingProfileClient(c.subscriptionID, c.credential, c.options)
return subClient
return &GallerySharingProfileClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewImagesClient creates a new instance of ImagesClient.
func (c *ClientFactory) NewImagesClient() *ImagesClient {
subClient, _ := NewImagesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &ImagesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewLogAnalyticsClient creates a new instance of LogAnalyticsClient.
func (c *ClientFactory) NewLogAnalyticsClient() *LogAnalyticsClient {
subClient, _ := NewLogAnalyticsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &LogAnalyticsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewOperationsClient creates a new instance of OperationsClient.
func (c *ClientFactory) NewOperationsClient() *OperationsClient {
subClient, _ := NewOperationsClient(c.credential, c.options)
return subClient
return &OperationsClient{
internal: c.internal,
}
}
// NewProximityPlacementGroupsClient creates a new instance of ProximityPlacementGroupsClient.
func (c *ClientFactory) NewProximityPlacementGroupsClient() *ProximityPlacementGroupsClient {
subClient, _ := NewProximityPlacementGroupsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &ProximityPlacementGroupsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewResourceSKUsClient creates a new instance of ResourceSKUsClient.
func (c *ClientFactory) NewResourceSKUsClient() *ResourceSKUsClient {
subClient, _ := NewResourceSKUsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &ResourceSKUsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewRestorePointCollectionsClient creates a new instance of RestorePointCollectionsClient.
func (c *ClientFactory) NewRestorePointCollectionsClient() *RestorePointCollectionsClient {
subClient, _ := NewRestorePointCollectionsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &RestorePointCollectionsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewRestorePointsClient creates a new instance of RestorePointsClient.
func (c *ClientFactory) NewRestorePointsClient() *RestorePointsClient {
subClient, _ := NewRestorePointsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &RestorePointsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewSSHPublicKeysClient creates a new instance of SSHPublicKeysClient.
func (c *ClientFactory) NewSSHPublicKeysClient() *SSHPublicKeysClient {
subClient, _ := NewSSHPublicKeysClient(c.subscriptionID, c.credential, c.options)
return subClient
return &SSHPublicKeysClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewSharedGalleriesClient creates a new instance of SharedGalleriesClient.
func (c *ClientFactory) NewSharedGalleriesClient() *SharedGalleriesClient {
subClient, _ := NewSharedGalleriesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &SharedGalleriesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewSharedGalleryImageVersionsClient creates a new instance of SharedGalleryImageVersionsClient.
func (c *ClientFactory) NewSharedGalleryImageVersionsClient() *SharedGalleryImageVersionsClient {
subClient, _ := NewSharedGalleryImageVersionsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &SharedGalleryImageVersionsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewSharedGalleryImagesClient creates a new instance of SharedGalleryImagesClient.
func (c *ClientFactory) NewSharedGalleryImagesClient() *SharedGalleryImagesClient {
subClient, _ := NewSharedGalleryImagesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &SharedGalleryImagesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewSnapshotsClient creates a new instance of SnapshotsClient.
func (c *ClientFactory) NewSnapshotsClient() *SnapshotsClient {
subClient, _ := NewSnapshotsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &SnapshotsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewUsageClient creates a new instance of UsageClient.
func (c *ClientFactory) NewUsageClient() *UsageClient {
subClient, _ := NewUsageClient(c.subscriptionID, c.credential, c.options)
return subClient
return &UsageClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineExtensionImagesClient creates a new instance of VirtualMachineExtensionImagesClient.
func (c *ClientFactory) NewVirtualMachineExtensionImagesClient() *VirtualMachineExtensionImagesClient {
subClient, _ := NewVirtualMachineExtensionImagesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineExtensionImagesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineExtensionsClient creates a new instance of VirtualMachineExtensionsClient.
func (c *ClientFactory) NewVirtualMachineExtensionsClient() *VirtualMachineExtensionsClient {
subClient, _ := NewVirtualMachineExtensionsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineExtensionsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineImagesClient creates a new instance of VirtualMachineImagesClient.
func (c *ClientFactory) NewVirtualMachineImagesClient() *VirtualMachineImagesClient {
subClient, _ := NewVirtualMachineImagesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineImagesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineImagesEdgeZoneClient creates a new instance of VirtualMachineImagesEdgeZoneClient.
func (c *ClientFactory) NewVirtualMachineImagesEdgeZoneClient() *VirtualMachineImagesEdgeZoneClient {
subClient, _ := NewVirtualMachineImagesEdgeZoneClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineImagesEdgeZoneClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineRunCommandsClient creates a new instance of VirtualMachineRunCommandsClient.
func (c *ClientFactory) NewVirtualMachineRunCommandsClient() *VirtualMachineRunCommandsClient {
subClient, _ := NewVirtualMachineRunCommandsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineRunCommandsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineScaleSetExtensionsClient creates a new instance of VirtualMachineScaleSetExtensionsClient.
func (c *ClientFactory) NewVirtualMachineScaleSetExtensionsClient() *VirtualMachineScaleSetExtensionsClient {
subClient, _ := NewVirtualMachineScaleSetExtensionsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineScaleSetExtensionsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineScaleSetRollingUpgradesClient creates a new instance of VirtualMachineScaleSetRollingUpgradesClient.
func (c *ClientFactory) NewVirtualMachineScaleSetRollingUpgradesClient() *VirtualMachineScaleSetRollingUpgradesClient {
subClient, _ := NewVirtualMachineScaleSetRollingUpgradesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineScaleSetRollingUpgradesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineScaleSetVMExtensionsClient creates a new instance of VirtualMachineScaleSetVMExtensionsClient.
func (c *ClientFactory) NewVirtualMachineScaleSetVMExtensionsClient() *VirtualMachineScaleSetVMExtensionsClient {
subClient, _ := NewVirtualMachineScaleSetVMExtensionsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineScaleSetVMExtensionsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineScaleSetVMRunCommandsClient creates a new instance of VirtualMachineScaleSetVMRunCommandsClient.
func (c *ClientFactory) NewVirtualMachineScaleSetVMRunCommandsClient() *VirtualMachineScaleSetVMRunCommandsClient {
subClient, _ := NewVirtualMachineScaleSetVMRunCommandsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineScaleSetVMRunCommandsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineScaleSetVMsClient creates a new instance of VirtualMachineScaleSetVMsClient.
func (c *ClientFactory) NewVirtualMachineScaleSetVMsClient() *VirtualMachineScaleSetVMsClient {
subClient, _ := NewVirtualMachineScaleSetVMsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineScaleSetVMsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineScaleSetsClient creates a new instance of VirtualMachineScaleSetsClient.
func (c *ClientFactory) NewVirtualMachineScaleSetsClient() *VirtualMachineScaleSetsClient {
subClient, _ := NewVirtualMachineScaleSetsClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineScaleSetsClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachineSizesClient creates a new instance of VirtualMachineSizesClient.
func (c *ClientFactory) NewVirtualMachineSizesClient() *VirtualMachineSizesClient {
subClient, _ := NewVirtualMachineSizesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachineSizesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewVirtualMachinesClient creates a new instance of VirtualMachinesClient.
func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient {
subClient, _ := NewVirtualMachinesClient(c.subscriptionID, c.credential, c.options)
return subClient
return &VirtualMachinesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}

View file

@ -180,10 +180,10 @@ func (client *CloudServiceRoleInstancesClient) getCreateRequest(ctx context.Cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-09-04")
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2022-09-04")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -380,10 +380,10 @@ func (client *CloudServiceRoleInstancesClient) listCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-09-04")
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2022-09-04")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -47,7 +47,7 @@ func NewCommunityGalleriesClient(subscriptionID string, credential azcore.TokenC
// Get - Get a community gallery by gallery public name.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - publicGalleryName - The public name of the community gallery.
// - options - CommunityGalleriesClientGetOptions contains the optional parameters for the CommunityGalleriesClient.Get method.
@ -93,7 +93,7 @@ func (client *CommunityGalleriesClient) getCreateRequest(ctx context.Context, lo
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -47,7 +47,7 @@ func NewCommunityGalleryImagesClient(subscriptionID string, credential azcore.To
// Get - Get a community gallery image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - publicGalleryName - The public name of the community gallery.
// - galleryImageName - The name of the community gallery image definition.
@ -99,7 +99,7 @@ func (client *CommunityGalleryImagesClient) getCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -116,7 +116,7 @@ func (client *CommunityGalleryImagesClient) getHandleResponse(resp *http.Respons
// NewListPager - List community gallery images inside a gallery.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - publicGalleryName - The public name of the community gallery.
// - options - CommunityGalleryImagesClientListOptions contains the optional parameters for the CommunityGalleryImagesClient.NewListPager
@ -164,7 +164,7 @@ func (client *CommunityGalleryImagesClient) listCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -47,7 +47,7 @@ func NewCommunityGalleryImageVersionsClient(subscriptionID string, credential az
// Get - Get a community gallery image version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - publicGalleryName - The public name of the community gallery.
// - galleryImageName - The name of the community gallery image definition.
@ -106,7 +106,7 @@ func (client *CommunityGalleryImageVersionsClient) getCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -123,7 +123,7 @@ func (client *CommunityGalleryImageVersionsClient) getHandleResponse(resp *http.
// NewListPager - List community gallery image versions inside an image.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - publicGalleryName - The public name of the community gallery.
// - galleryImageName - The name of the community gallery image definition.
@ -176,7 +176,7 @@ func (client *CommunityGalleryImageVersionsClient) listCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -10,7 +10,7 @@ package armcompute
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
moduleVersion = "v5.5.0"
moduleVersion = "v5.7.0"
)
type AccessLevel string
@ -333,15 +333,17 @@ func PossibleDiffDiskOptionsValues() []DiffDiskOptions {
}
// DiffDiskPlacement - Specifies the ephemeral disk placement for operating system disk. This property can be used by user
// in the request to choose the location i.e, cache disk or resource disk space for Ephemeral OS disk
// provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements
// for Windows VM at
// in the request to choose the location i.e, cache disk, resource disk or nvme disk space for
// Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS
// disk size requirements for Windows VM at
// https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at
// https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements
// https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. Minimum api-version for NvmeDisk:
// 2024-03-01.
type DiffDiskPlacement string
const (
DiffDiskPlacementCacheDisk DiffDiskPlacement = "CacheDisk"
DiffDiskPlacementNvmeDisk DiffDiskPlacement = "NvmeDisk"
DiffDiskPlacementResourceDisk DiffDiskPlacement = "ResourceDisk"
)
@ -349,6 +351,7 @@ const (
func PossibleDiffDiskPlacementValues() []DiffDiskPlacement {
return []DiffDiskPlacement{
DiffDiskPlacementCacheDisk,
DiffDiskPlacementNvmeDisk,
DiffDiskPlacementResourceDisk,
}
}
@ -425,25 +428,31 @@ func PossibleDiskCreateOptionValues() []DiskCreateOption {
}
}
// DiskCreateOptionTypes - Specifies how the virtual machine should be created. Possible values are: Attach. This value is
// used when you are using a specialized disk to create the virtual machine. FromImage. This value is used
// when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference
// element described above. If you are using a marketplace image, you also
// use the plan element previously described.
// DiskCreateOptionTypes - Specifies how the virtual machine disk should be created. Possible values are Attach: This value
// is used when you are using a specialized disk to create the virtual machine. FromImage: This value is
// used when you are using an image to create the virtual machine. If you are using a platform image, you should also use
// the imageReference element described above. If you are using a marketplace image,
// you should also use the plan element previously described. Empty: This value is used when creating an empty data disk.
// Copy: This value is used to create a data disk from a snapshot or another disk.
// Restore: This value is used to create a data disk from a disk restore point.
type DiskCreateOptionTypes string
const (
DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach"
DiskCreateOptionTypesCopy DiskCreateOptionTypes = "Copy"
DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty"
DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage"
DiskCreateOptionTypesRestore DiskCreateOptionTypes = "Restore"
)
// PossibleDiskCreateOptionTypesValues returns the possible values for the DiskCreateOptionTypes const type.
func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes {
return []DiskCreateOptionTypes{
DiskCreateOptionTypesAttach,
DiskCreateOptionTypesCopy,
DiskCreateOptionTypesEmpty,
DiskCreateOptionTypesFromImage,
DiskCreateOptionTypesRestore,
}
}
@ -1678,6 +1687,23 @@ func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes {
}
}
type ResourceIDOptionsForGetCapacityReservationGroups string
const (
ResourceIDOptionsForGetCapacityReservationGroupsAll ResourceIDOptionsForGetCapacityReservationGroups = "All"
ResourceIDOptionsForGetCapacityReservationGroupsCreatedInSubscription ResourceIDOptionsForGetCapacityReservationGroups = "CreatedInSubscription"
ResourceIDOptionsForGetCapacityReservationGroupsSharedWithSubscription ResourceIDOptionsForGetCapacityReservationGroups = "SharedWithSubscription"
)
// PossibleResourceIDOptionsForGetCapacityReservationGroupsValues returns the possible values for the ResourceIDOptionsForGetCapacityReservationGroups const type.
func PossibleResourceIDOptionsForGetCapacityReservationGroupsValues() []ResourceIDOptionsForGetCapacityReservationGroups {
return []ResourceIDOptionsForGetCapacityReservationGroups{
ResourceIDOptionsForGetCapacityReservationGroupsAll,
ResourceIDOptionsForGetCapacityReservationGroupsCreatedInSubscription,
ResourceIDOptionsForGetCapacityReservationGroupsSharedWithSubscription,
}
}
// ResourceIdentityType - The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned'
// includes both an implicitly created identity and a set of user assigned identities. The type 'None'
// will remove any identities from the virtual machine scale set.

View file

@ -48,7 +48,7 @@ func NewDedicatedHostGroupsClient(subscriptionID string, credential azcore.Token
// see Dedicated Host Documentation [https://go.microsoft.com/fwlink/?linkid=2082596]
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - parameters - Parameters supplied to the Create Dedicated Host Group.
@ -96,7 +96,7 @@ func (client *DedicatedHostGroupsClient) createOrUpdateCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -117,7 +117,7 @@ func (client *DedicatedHostGroupsClient) createOrUpdateHandleResponse(resp *http
// Delete - Delete a dedicated host group.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - options - DedicatedHostGroupsClientDeleteOptions contains the optional parameters for the DedicatedHostGroupsClient.Delete
@ -163,7 +163,7 @@ func (client *DedicatedHostGroupsClient) deleteCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -172,7 +172,7 @@ func (client *DedicatedHostGroupsClient) deleteCreateRequest(ctx context.Context
// Get - Retrieves information about a dedicated host group.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - options - DedicatedHostGroupsClientGetOptions contains the optional parameters for the DedicatedHostGroupsClient.Get method.
@ -221,7 +221,7 @@ func (client *DedicatedHostGroupsClient) getCreateRequest(ctx context.Context, r
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -239,7 +239,7 @@ func (client *DedicatedHostGroupsClient) getHandleResponse(resp *http.Response)
// NewListByResourceGroupPager - Lists all of the dedicated host groups in the specified resource group. Use the nextLink
// property in the response to get the next page of dedicated host groups.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - DedicatedHostGroupsClientListByResourceGroupOptions contains the optional parameters for the DedicatedHostGroupsClient.NewListByResourceGroupPager
// method.
@ -282,7 +282,7 @@ func (client *DedicatedHostGroupsClient) listByResourceGroupCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -300,7 +300,7 @@ func (client *DedicatedHostGroupsClient) listByResourceGroupHandleResponse(resp
// NewListBySubscriptionPager - Lists all of the dedicated host groups in the subscription. Use the nextLink property in the
// response to get the next page of dedicated host groups.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - DedicatedHostGroupsClientListBySubscriptionOptions contains the optional parameters for the DedicatedHostGroupsClient.NewListBySubscriptionPager
// method.
func (client *DedicatedHostGroupsClient) NewListBySubscriptionPager(options *DedicatedHostGroupsClientListBySubscriptionOptions) *runtime.Pager[DedicatedHostGroupsClientListBySubscriptionResponse] {
@ -338,7 +338,7 @@ func (client *DedicatedHostGroupsClient) listBySubscriptionCreateRequest(ctx con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -356,7 +356,7 @@ func (client *DedicatedHostGroupsClient) listBySubscriptionHandleResponse(resp *
// Update - Update an dedicated host group.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - parameters - Parameters supplied to the Update Dedicated Host Group operation.
@ -404,7 +404,7 @@ func (client *DedicatedHostGroupsClient) updateCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -47,7 +47,7 @@ func NewDedicatedHostsClient(subscriptionID string, credential azcore.TokenCrede
// BeginCreateOrUpdate - Create or update a dedicated host .
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - hostName - The name of the dedicated host .
@ -74,7 +74,7 @@ func (client *DedicatedHostsClient) BeginCreateOrUpdate(ctx context.Context, res
// CreateOrUpdate - Create or update a dedicated host .
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *DedicatedHostsClient) createOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost, options *DedicatedHostsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "DedicatedHostsClient.BeginCreateOrUpdate"
@ -120,7 +120,7 @@ func (client *DedicatedHostsClient) createOrUpdateCreateRequest(ctx context.Cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -132,7 +132,7 @@ func (client *DedicatedHostsClient) createOrUpdateCreateRequest(ctx context.Cont
// BeginDelete - Delete a dedicated host.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - hostName - The name of the dedicated host.
@ -158,7 +158,7 @@ func (client *DedicatedHostsClient) BeginDelete(ctx context.Context, resourceGro
// Delete - Delete a dedicated host.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *DedicatedHostsClient) deleteOperation(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "DedicatedHostsClient.BeginDelete"
@ -204,7 +204,7 @@ func (client *DedicatedHostsClient) deleteCreateRequest(ctx context.Context, res
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -213,7 +213,7 @@ func (client *DedicatedHostsClient) deleteCreateRequest(ctx context.Context, res
// Get - Retrieves information about a dedicated host.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - hostName - The name of the dedicated host.
@ -267,7 +267,7 @@ func (client *DedicatedHostsClient) getCreateRequest(ctx context.Context, resour
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -285,7 +285,7 @@ func (client *DedicatedHostsClient) getHandleResponse(resp *http.Response) (Dedi
// NewListAvailableSizesPager - Lists all available dedicated host sizes to which the specified dedicated host can be resized.
// NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - hostName - The name of the dedicated host.
@ -339,7 +339,7 @@ func (client *DedicatedHostsClient) listAvailableSizesCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -357,7 +357,7 @@ func (client *DedicatedHostsClient) listAvailableSizesHandleResponse(resp *http.
// NewListByHostGroupPager - Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property
// in the response to get the next page of dedicated hosts.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - options - DedicatedHostsClientListByHostGroupOptions contains the optional parameters for the DedicatedHostsClient.NewListByHostGroupPager
@ -405,7 +405,7 @@ func (client *DedicatedHostsClient) listByHostGroupCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -426,7 +426,7 @@ func (client *DedicatedHostsClient) listByHostGroupHandleResponse(resp *http.Res
// for more details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - hostName - The name of the dedicated host.
@ -455,7 +455,7 @@ func (client *DedicatedHostsClient) BeginRedeploy(ctx context.Context, resourceG
// for more details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *DedicatedHostsClient) redeploy(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRedeployOptions) (*http.Response, error) {
var err error
const operationName = "DedicatedHostsClient.BeginRedeploy"
@ -501,7 +501,7 @@ func (client *DedicatedHostsClient) redeployCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -513,7 +513,7 @@ func (client *DedicatedHostsClient) redeployCreateRequest(ctx context.Context, r
// for more details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - hostName - The name of the dedicated host.
@ -542,7 +542,7 @@ func (client *DedicatedHostsClient) BeginRestart(ctx context.Context, resourceGr
// for more details.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *DedicatedHostsClient) restart(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRestartOptions) (*http.Response, error) {
var err error
const operationName = "DedicatedHostsClient.BeginRestart"
@ -588,7 +588,7 @@ func (client *DedicatedHostsClient) restartCreateRequest(ctx context.Context, re
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -597,7 +597,7 @@ func (client *DedicatedHostsClient) restartCreateRequest(ctx context.Context, re
// BeginUpdate - Update a dedicated host .
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - hostGroupName - The name of the dedicated host group.
// - hostName - The name of the dedicated host .
@ -624,7 +624,7 @@ func (client *DedicatedHostsClient) BeginUpdate(ctx context.Context, resourceGro
// Update - Update a dedicated host .
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *DedicatedHostsClient) update(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate, options *DedicatedHostsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "DedicatedHostsClient.BeginUpdate"
@ -670,7 +670,7 @@ func (client *DedicatedHostsClient) updateCreateRequest(ctx context.Context, res
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -47,7 +47,7 @@ func NewGalleriesClient(subscriptionID string, credential azcore.TokenCredential
// BeginCreateOrUpdate - Create or update a Shared Image Gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods
// allowed in the middle. The maximum length is 80 characters.
@ -74,7 +74,7 @@ func (client *GalleriesClient) BeginCreateOrUpdate(ctx context.Context, resource
// CreateOrUpdate - Create or update a Shared Image Gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery, options *GalleriesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleriesClient.BeginCreateOrUpdate"
@ -116,7 +116,7 @@ func (client *GalleriesClient) createOrUpdateCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, gallery); err != nil {
@ -128,7 +128,7 @@ func (client *GalleriesClient) createOrUpdateCreateRequest(ctx context.Context,
// BeginDelete - Delete a Shared Image Gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery to be deleted.
// - options - GalleriesClientBeginDeleteOptions contains the optional parameters for the GalleriesClient.BeginDelete method.
@ -152,7 +152,7 @@ func (client *GalleriesClient) BeginDelete(ctx context.Context, resourceGroupNam
// Delete - Delete a Shared Image Gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleriesClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "GalleriesClient.BeginDelete"
@ -194,7 +194,7 @@ func (client *GalleriesClient) deleteCreateRequest(ctx context.Context, resource
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -203,7 +203,7 @@ func (client *GalleriesClient) deleteCreateRequest(ctx context.Context, resource
// Get - Retrieves information about a Shared Image Gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery.
// - options - GalleriesClientGetOptions contains the optional parameters for the GalleriesClient.Get method.
@ -249,13 +249,13 @@ func (client *GalleriesClient) getCreateRequest(ctx context.Context, resourceGro
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
if options != nil && options.Select != nil {
reqQP.Set("$select", string(*options.Select))
}
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
if options != nil && options.Select != nil {
reqQP.Set("$select", string(*options.Select))
}
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -272,7 +272,7 @@ func (client *GalleriesClient) getHandleResponse(resp *http.Response) (Galleries
// NewListPager - List galleries under a subscription.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - options - GalleriesClientListOptions contains the optional parameters for the GalleriesClient.NewListPager method.
func (client *GalleriesClient) NewListPager(options *GalleriesClientListOptions) *runtime.Pager[GalleriesClientListResponse] {
return runtime.NewPager(runtime.PagingHandler[GalleriesClientListResponse]{
@ -309,7 +309,7 @@ func (client *GalleriesClient) listCreateRequest(ctx context.Context, options *G
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -326,7 +326,7 @@ func (client *GalleriesClient) listHandleResponse(resp *http.Response) (Gallerie
// NewListByResourceGroupPager - List galleries under a resource group.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - options - GalleriesClientListByResourceGroupOptions contains the optional parameters for the GalleriesClient.NewListByResourceGroupPager
// method.
@ -369,7 +369,7 @@ func (client *GalleriesClient) listByResourceGroupCreateRequest(ctx context.Cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -387,7 +387,7 @@ func (client *GalleriesClient) listByResourceGroupHandleResponse(resp *http.Resp
// BeginUpdate - Update a Shared Image Gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods
// allowed in the middle. The maximum length is 80 characters.
@ -413,7 +413,7 @@ func (client *GalleriesClient) BeginUpdate(ctx context.Context, resourceGroupNam
// Update - Update a Shared Image Gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleriesClient) update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate, options *GalleriesClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleriesClient.BeginUpdate"
@ -455,7 +455,7 @@ func (client *GalleriesClient) updateCreateRequest(ctx context.Context, resource
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, gallery); err != nil {

View file

@ -47,7 +47,7 @@ func NewGalleryApplicationsClient(subscriptionID string, credential azcore.Token
// BeginCreateOrUpdate - Create or update a gallery Application Definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be created.
// - galleryApplicationName - The name of the gallery Application Definition to be created or updated. The allowed characters
@ -76,7 +76,7 @@ func (client *GalleryApplicationsClient) BeginCreateOrUpdate(ctx context.Context
// CreateOrUpdate - Create or update a gallery Application Definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryApplicationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication, options *GalleryApplicationsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleryApplicationsClient.BeginCreateOrUpdate"
@ -122,7 +122,7 @@ func (client *GalleryApplicationsClient) createOrUpdateCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, galleryApplication); err != nil {
@ -134,7 +134,7 @@ func (client *GalleryApplicationsClient) createOrUpdateCreateRequest(ctx context
// BeginDelete - Delete a gallery Application.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be deleted.
// - galleryApplicationName - The name of the gallery Application Definition to be deleted.
@ -160,7 +160,7 @@ func (client *GalleryApplicationsClient) BeginDelete(ctx context.Context, resour
// Delete - Delete a gallery Application.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryApplicationsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "GalleryApplicationsClient.BeginDelete"
@ -206,7 +206,7 @@ func (client *GalleryApplicationsClient) deleteCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -215,7 +215,7 @@ func (client *GalleryApplicationsClient) deleteCreateRequest(ctx context.Context
// Get - Retrieves information about a gallery Application Definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery from which the Application Definitions are to be retrieved.
// - galleryApplicationName - The name of the gallery Application Definition to be retrieved.
@ -266,7 +266,7 @@ func (client *GalleryApplicationsClient) getCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -283,7 +283,7 @@ func (client *GalleryApplicationsClient) getHandleResponse(resp *http.Response)
// NewListByGalleryPager - List gallery Application Definitions in a gallery.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery from which Application Definitions are to be listed.
// - options - GalleryApplicationsClientListByGalleryOptions contains the optional parameters for the GalleryApplicationsClient.NewListByGalleryPager
@ -331,7 +331,7 @@ func (client *GalleryApplicationsClient) listByGalleryCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -349,7 +349,7 @@ func (client *GalleryApplicationsClient) listByGalleryHandleResponse(resp *http.
// BeginUpdate - Update a gallery Application Definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be updated.
// - galleryApplicationName - The name of the gallery Application Definition to be updated. The allowed characters are alphabets
@ -378,7 +378,7 @@ func (client *GalleryApplicationsClient) BeginUpdate(ctx context.Context, resour
// Update - Update a gallery Application Definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryApplicationsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate, options *GalleryApplicationsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleryApplicationsClient.BeginUpdate"
@ -424,7 +424,7 @@ func (client *GalleryApplicationsClient) updateCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, galleryApplication); err != nil {

View file

@ -47,7 +47,7 @@ func NewGalleryApplicationVersionsClient(subscriptionID string, credential azcor
// BeginCreateOrUpdate - Create or update a gallery Application Version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version is to be created.
@ -77,7 +77,7 @@ func (client *GalleryApplicationVersionsClient) BeginCreateOrUpdate(ctx context.
// CreateOrUpdate - Create or update a gallery Application Version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryApplicationVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion, options *GalleryApplicationVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleryApplicationVersionsClient.BeginCreateOrUpdate"
@ -127,7 +127,7 @@ func (client *GalleryApplicationVersionsClient) createOrUpdateCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, galleryApplicationVersion); err != nil {
@ -139,7 +139,7 @@ func (client *GalleryApplicationVersionsClient) createOrUpdateCreateRequest(ctx
// BeginDelete - Delete a gallery Application Version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version resides.
@ -166,7 +166,7 @@ func (client *GalleryApplicationVersionsClient) BeginDelete(ctx context.Context,
// Delete - Delete a gallery Application Version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryApplicationVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "GalleryApplicationVersionsClient.BeginDelete"
@ -216,7 +216,7 @@ func (client *GalleryApplicationVersionsClient) deleteCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -225,7 +225,7 @@ func (client *GalleryApplicationVersionsClient) deleteCreateRequest(ctx context.
// Get - Retrieves information about a gallery Application Version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version resides.
@ -285,7 +285,7 @@ func (client *GalleryApplicationVersionsClient) getCreateRequest(ctx context.Con
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -302,7 +302,7 @@ func (client *GalleryApplicationVersionsClient) getHandleResponse(resp *http.Res
// NewListByGalleryApplicationPager - List gallery Application Versions in a gallery Application Definition.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
// - galleryApplicationName - The name of the Shared Application Gallery Application Definition from which the Application Versions
@ -356,7 +356,7 @@ func (client *GalleryApplicationVersionsClient) listByGalleryApplicationCreateRe
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -374,7 +374,7 @@ func (client *GalleryApplicationVersionsClient) listByGalleryApplicationHandleRe
// BeginUpdate - Update a gallery Application Version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version is to be updated.
@ -404,7 +404,7 @@ func (client *GalleryApplicationVersionsClient) BeginUpdate(ctx context.Context,
// Update - Update a gallery Application Version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryApplicationVersionsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate, options *GalleryApplicationVersionsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleryApplicationVersionsClient.BeginUpdate"
@ -454,7 +454,7 @@ func (client *GalleryApplicationVersionsClient) updateCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, galleryApplicationVersion); err != nil {

View file

@ -47,7 +47,7 @@ func NewGalleryImagesClient(subscriptionID string, credential azcore.TokenCreden
// BeginCreateOrUpdate - Create or update a gallery image definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be created.
// - galleryImageName - The name of the gallery image definition to be created or updated. The allowed characters are alphabets
@ -76,7 +76,7 @@ func (client *GalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, reso
// CreateOrUpdate - Create or update a gallery image definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryImagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage, options *GalleryImagesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleryImagesClient.BeginCreateOrUpdate"
@ -122,7 +122,7 @@ func (client *GalleryImagesClient) createOrUpdateCreateRequest(ctx context.Conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, galleryImage); err != nil {
@ -134,7 +134,7 @@ func (client *GalleryImagesClient) createOrUpdateCreateRequest(ctx context.Conte
// BeginDelete - Delete a gallery image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be deleted.
// - galleryImageName - The name of the gallery image definition to be deleted.
@ -160,7 +160,7 @@ func (client *GalleryImagesClient) BeginDelete(ctx context.Context, resourceGrou
// Delete - Delete a gallery image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryImagesClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "GalleryImagesClient.BeginDelete"
@ -206,7 +206,7 @@ func (client *GalleryImagesClient) deleteCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -215,7 +215,7 @@ func (client *GalleryImagesClient) deleteCreateRequest(ctx context.Context, reso
// Get - Retrieves information about a gallery image definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
// - galleryImageName - The name of the gallery image definition to be retrieved.
@ -266,7 +266,7 @@ func (client *GalleryImagesClient) getCreateRequest(ctx context.Context, resourc
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -283,7 +283,7 @@ func (client *GalleryImagesClient) getHandleResponse(resp *http.Response) (Galle
// NewListByGalleryPager - List gallery image definitions in a gallery.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery from which Image Definitions are to be listed.
// - options - GalleryImagesClientListByGalleryOptions contains the optional parameters for the GalleryImagesClient.NewListByGalleryPager
@ -331,7 +331,7 @@ func (client *GalleryImagesClient) listByGalleryCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -349,7 +349,7 @@ func (client *GalleryImagesClient) listByGalleryHandleResponse(resp *http.Respon
// BeginUpdate - Update a gallery image definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be updated.
// - galleryImageName - The name of the gallery image definition to be updated. The allowed characters are alphabets and numbers
@ -377,7 +377,7 @@ func (client *GalleryImagesClient) BeginUpdate(ctx context.Context, resourceGrou
// Update - Update a gallery image definition.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryImagesClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate, options *GalleryImagesClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleryImagesClient.BeginUpdate"
@ -423,7 +423,7 @@ func (client *GalleryImagesClient) updateCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, galleryImage); err != nil {

View file

@ -47,7 +47,7 @@ func NewGalleryImageVersionsClient(subscriptionID string, credential azcore.Toke
// BeginCreateOrUpdate - Create or update a gallery image version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
// - galleryImageName - The name of the gallery image definition in which the Image Version is to be created.
@ -77,7 +77,7 @@ func (client *GalleryImageVersionsClient) BeginCreateOrUpdate(ctx context.Contex
// CreateOrUpdate - Create or update a gallery image version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryImageVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion, options *GalleryImageVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleryImageVersionsClient.BeginCreateOrUpdate"
@ -127,7 +127,7 @@ func (client *GalleryImageVersionsClient) createOrUpdateCreateRequest(ctx contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, galleryImageVersion); err != nil {
@ -139,7 +139,7 @@ func (client *GalleryImageVersionsClient) createOrUpdateCreateRequest(ctx contex
// BeginDelete - Delete a gallery image version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
// - galleryImageName - The name of the gallery image definition in which the Image Version resides.
@ -166,7 +166,7 @@ func (client *GalleryImageVersionsClient) BeginDelete(ctx context.Context, resou
// Delete - Delete a gallery image version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryImageVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "GalleryImageVersionsClient.BeginDelete"
@ -216,7 +216,7 @@ func (client *GalleryImageVersionsClient) deleteCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -225,7 +225,7 @@ func (client *GalleryImageVersionsClient) deleteCreateRequest(ctx context.Contex
// Get - Retrieves information about a gallery image version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
// - galleryImageName - The name of the gallery image definition in which the Image Version resides.
@ -285,7 +285,7 @@ func (client *GalleryImageVersionsClient) getCreateRequest(ctx context.Context,
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -302,7 +302,7 @@ func (client *GalleryImageVersionsClient) getHandleResponse(resp *http.Response)
// NewListByGalleryImagePager - List gallery image versions in a gallery image definition.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
// - galleryImageName - The name of the Shared Image Gallery Image Definition from which the Image Versions are to be listed.
@ -355,7 +355,7 @@ func (client *GalleryImageVersionsClient) listByGalleryImageCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -373,7 +373,7 @@ func (client *GalleryImageVersionsClient) listByGalleryImageHandleResponse(resp
// BeginUpdate - Update a gallery image version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
// - galleryImageName - The name of the gallery image definition in which the Image Version is to be updated.
@ -403,7 +403,7 @@ func (client *GalleryImageVersionsClient) BeginUpdate(ctx context.Context, resou
// Update - Update a gallery image version.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GalleryImageVersionsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate, options *GalleryImageVersionsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GalleryImageVersionsClient.BeginUpdate"
@ -453,7 +453,7 @@ func (client *GalleryImageVersionsClient) updateCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, galleryImageVersion); err != nil {

View file

@ -47,7 +47,7 @@ func NewGallerySharingProfileClient(subscriptionID string, credential azcore.Tok
// BeginUpdate - Update sharing profile of a gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - resourceGroupName - The name of the resource group.
// - galleryName - The name of the Shared Image Gallery.
// - sharingUpdate - Parameters supplied to the update gallery sharing profile.
@ -73,7 +73,7 @@ func (client *GallerySharingProfileClient) BeginUpdate(ctx context.Context, reso
// Update - Update sharing profile of a gallery.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
func (client *GallerySharingProfileClient) update(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate, options *GallerySharingProfileClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "GallerySharingProfileClient.BeginUpdate"
@ -115,7 +115,7 @@ func (client *GallerySharingProfileClient) updateCreateRequest(ctx context.Conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, sharingUpdate); err != nil {

View file

@ -47,7 +47,7 @@ func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, o
// BeginCreateOrUpdate - Create or update an image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - imageName - The name of the image.
// - parameters - Parameters supplied to the Create Image operation.
@ -73,7 +73,7 @@ func (client *ImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGro
// CreateOrUpdate - Create or update an image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *ImagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image, options *ImagesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "ImagesClient.BeginCreateOrUpdate"
@ -115,7 +115,7 @@ func (client *ImagesClient) createOrUpdateCreateRequest(ctx context.Context, res
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -127,7 +127,7 @@ func (client *ImagesClient) createOrUpdateCreateRequest(ctx context.Context, res
// BeginDelete - Deletes an Image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - imageName - The name of the image.
// - options - ImagesClientBeginDeleteOptions contains the optional parameters for the ImagesClient.BeginDelete method.
@ -151,7 +151,7 @@ func (client *ImagesClient) BeginDelete(ctx context.Context, resourceGroupName s
// Delete - Deletes an Image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *ImagesClient) deleteOperation(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "ImagesClient.BeginDelete"
@ -193,7 +193,7 @@ func (client *ImagesClient) deleteCreateRequest(ctx context.Context, resourceGro
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -202,7 +202,7 @@ func (client *ImagesClient) deleteCreateRequest(ctx context.Context, resourceGro
// Get - Gets an image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - imageName - The name of the image.
// - options - ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
@ -251,7 +251,7 @@ func (client *ImagesClient) getCreateRequest(ctx context.Context, resourceGroupN
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -269,7 +269,7 @@ func (client *ImagesClient) getHandleResponse(resp *http.Response) (ImagesClient
// NewListPager - Gets the list of Images in the subscription. Use nextLink property in the response to get the next page
// of Images. Do this till nextLink is null to fetch all the Images.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - ImagesClientListOptions contains the optional parameters for the ImagesClient.NewListPager method.
func (client *ImagesClient) NewListPager(options *ImagesClientListOptions) *runtime.Pager[ImagesClientListResponse] {
return runtime.NewPager(runtime.PagingHandler[ImagesClientListResponse]{
@ -306,7 +306,7 @@ func (client *ImagesClient) listCreateRequest(ctx context.Context, options *Imag
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -324,7 +324,7 @@ func (client *ImagesClient) listHandleResponse(resp *http.Response) (ImagesClien
// NewListByResourceGroupPager - Gets the list of images under a resource group. Use nextLink property in the response to
// get the next page of Images. Do this till nextLink is null to fetch all the Images.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - ImagesClientListByResourceGroupOptions contains the optional parameters for the ImagesClient.NewListByResourceGroupPager
// method.
@ -367,7 +367,7 @@ func (client *ImagesClient) listByResourceGroupCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -385,7 +385,7 @@ func (client *ImagesClient) listByResourceGroupHandleResponse(resp *http.Respons
// BeginUpdate - Update an image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - imageName - The name of the image.
// - parameters - Parameters supplied to the Update Image operation.
@ -410,7 +410,7 @@ func (client *ImagesClient) BeginUpdate(ctx context.Context, resourceGroupName s
// Update - Update an image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *ImagesClient) update(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate, options *ImagesClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "ImagesClient.BeginUpdate"
@ -452,7 +452,7 @@ func (client *ImagesClient) updateCreateRequest(ctx context.Context, resourceGro
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -48,7 +48,7 @@ func NewLogAnalyticsClient(subscriptionID string, credential azcore.TokenCredent
// to show throttling activities.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The location upon which virtual-machine-sizes is queried.
// - parameters - Parameters supplied to the LogAnalytics getRequestRateByInterval Api.
// - options - LogAnalyticsClientBeginExportRequestRateByIntervalOptions contains the optional parameters for the LogAnalyticsClient.BeginExportRequestRateByInterval
@ -75,7 +75,7 @@ func (client *LogAnalyticsClient) BeginExportRequestRateByInterval(ctx context.C
// show throttling activities.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *LogAnalyticsClient) exportRequestRateByInterval(ctx context.Context, location string, parameters RequestRateByIntervalInput, options *LogAnalyticsClientBeginExportRequestRateByIntervalOptions) (*http.Response, error) {
var err error
const operationName = "LogAnalyticsClient.BeginExportRequestRateByInterval"
@ -113,7 +113,7 @@ func (client *LogAnalyticsClient) exportRequestRateByIntervalCreateRequest(ctx c
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -126,7 +126,7 @@ func (client *LogAnalyticsClient) exportRequestRateByIntervalCreateRequest(ctx c
// window.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The location upon which virtual-machine-sizes is queried.
// - parameters - Parameters supplied to the LogAnalytics getThrottledRequests Api.
// - options - LogAnalyticsClientBeginExportThrottledRequestsOptions contains the optional parameters for the LogAnalyticsClient.BeginExportThrottledRequests
@ -152,7 +152,7 @@ func (client *LogAnalyticsClient) BeginExportThrottledRequests(ctx context.Conte
// ExportThrottledRequests - Export logs that show total throttled Api requests for this subscription in the given time window.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *LogAnalyticsClient) exportThrottledRequests(ctx context.Context, location string, parameters ThrottledRequestsInput, options *LogAnalyticsClientBeginExportThrottledRequestsOptions) (*http.Response, error) {
var err error
const operationName = "LogAnalyticsClient.BeginExportThrottledRequests"
@ -190,7 +190,7 @@ func (client *LogAnalyticsClient) exportThrottledRequestsCreateRequest(ctx conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -368,7 +368,7 @@ type CapacityReservationGroupInstanceView struct {
// READ-ONLY; List of instance view of the capacity reservations under the capacity reservation group.
CapacityReservations []*CapacityReservationInstanceViewWithName
// READ-ONLY; List of the subscriptions that the capacity reservation group is shared with. Note: Minimum api-version: 2023-09-01.
// READ-ONLY; List of the subscriptions that the capacity reservation group is shared with. Note: Minimum api-version: 2024-03-01.
// Please refer to https://aka.ms/computereservationsharing for more details.
SharedSubscriptionIDs []*SubResourceReadOnly
}
@ -388,7 +388,7 @@ type CapacityReservationGroupProperties struct {
// Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. Pls. keep in
// mind the capacity reservation group resource generally can be shared across
// subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship established between
// the AAD tenants. Note: Minimum api-version: 2023-09-01. Please refer to
// the AAD tenants. Note: Minimum api-version: 2024-03-01. Please refer to
// https://aka.ms/computereservationsharing for more details.
SharingProfile *ResourceSharingProfile
@ -1064,11 +1064,13 @@ type CreationData struct {
// DataDisk - Describes a data disk.
type DataDisk struct {
// REQUIRED; Specifies how the virtual machine should be created. Possible values are: Attach. This value is used when you
// are using a specialized disk to create the virtual machine. FromImage. This value is used
// when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference
// element described above. If you are using a marketplace image, you
// should also use the plan element previously described.
// REQUIRED; Specifies how the virtual machine disk should be created. Possible values are Attach: This value is used when
// you are using a specialized disk to create the virtual machine. FromImage: This value is
// used when you are using an image to create the virtual machine data disk. If you are using a platform image, you should
// also use the imageReference element described above. If you are using a
// marketplace image, you should also use the plan element previously described. Empty: This value is used when creating an
// empty data disk. Copy: This value is used to create a data disk from a snapshot
// or another disk. Restore: This value is used to create a data disk from a disk restore point.
CreateOption *DiskCreateOptionTypes
// REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and
@ -1110,6 +1112,9 @@ type DataDisk struct {
// The disk name.
Name *string
// The source resource identifier. It can be a snapshot, or disk restore point from which to create a disk.
SourceResource *APIEntityReference
// Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
ToBeDetached *bool
@ -1153,10 +1158,25 @@ type DataDisksToAttach struct {
// REQUIRED; ID of the managed data disk.
DiskID *string
// Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for
// Standard storage. ReadOnly for Premium storage.
Caching *CachingTypes
// Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: Delete. If this value
// is used, the data disk is deleted when VM is deleted. Detach. If this value is
// used, the data disk is retained after VM is deleted. The default value is set to Detach.
DeleteOption *DiskDeleteOptionTypes
// Specifies the customer managed disk encryption set resource id for the managed disk.
DiskEncryptionSet *DiskEncryptionSetParameters
// The logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be
// unique for each data disk attached to a VM. If not specified, lun would be auto
// assigned.
Lun *int32
// Specifies whether writeAccelerator should be enabled or disabled on the disk.
WriteAcceleratorEnabled *bool
}
// DataDisksToDetach - Describes the data disk to be detached.
@ -1408,11 +1428,12 @@ type DiffDiskSettings struct {
// Specifies the ephemeral disk settings for operating system disk.
Option *DiffDiskOptions
// Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk. The defaulting
// behavior is: CacheDisk if one is configured for the VM size otherwise
// ResourceDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes
// Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk.
// The defaulting behavior is: CacheDisk if one is configured for the VM size
// otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes
// and Linux VM at
// https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk.
// https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version
// for NvmeDisk: 2024-03-01.
Placement *DiffDiskPlacement
}
@ -2075,6 +2096,12 @@ type EncryptionSettingsElement struct {
KeyEncryptionKey *KeyVaultAndKeyReference
}
// EventGridAndResourceGraph - Specifies eventGridAndResourceGraph related Scheduled Event related configurations.
type EventGridAndResourceGraph struct {
// Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
Enable *bool
}
// ExtendedLocation - The complex type of the extended location.
type ExtendedLocation struct {
// The name of the extended location.
@ -2385,13 +2412,17 @@ type GalleryArtifactVersionFullSource struct {
// The resource Id of the source Community Gallery Image. Only required when using Community Gallery Image as a source.
CommunityGalleryImageID *string
// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.
// The id of the gallery artifact version source.
ID *string
// The resource Id of the source virtual machine. Only required when capturing a virtual machine to source this Gallery Image
// Version.
VirtualMachineID *string
}
// GalleryArtifactVersionSource - The gallery artifact version source.
type GalleryArtifactVersionSource struct {
// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.
// The id of the gallery artifact version source.
ID *string
}
@ -2426,7 +2457,7 @@ type GalleryDiskImage struct {
// GalleryDiskImageSource - The source for the disk image.
type GalleryDiskImageSource struct {
// The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.
// The id of the gallery artifact version source.
ID *string
// The Storage Account Id that contains the vhd blob being used as a source for this artifact version.
@ -3445,11 +3476,11 @@ type NetworkProfile struct {
// disks, see About disks and VHDs for Azure virtual machines
// [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
type OSDisk struct {
// REQUIRED; Specifies how the virtual machine should be created. Possible values are: Attach. This value is used when you
// are using a specialized disk to create the virtual machine. FromImage. This value is used
// when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference
// element described above. If you are using a marketplace image, you
// should also use the plan element previously described.
// REQUIRED; Specifies how the virtual machine disk should be created. Possible values are Attach: This value is used when
// you are using a specialized disk to create the virtual machine. FromImage: This value is
// used when you are using an image to create the virtual machine. If you are using a platform image, you should also use
// the imageReference element described above. If you are using a marketplace image,
// you should also use the plan element previously described.
CreateOption *DiskCreateOptionTypes
// Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for
@ -4070,7 +4101,7 @@ type ProximityPlacementGroupUpdate struct {
Tags map[string]*string
}
// ProxyAgentSettings - Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2023-09-01.
// ProxyAgentSettings - Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2024-03-01.
type ProxyAgentSettings struct {
// Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual machine scale set.
Enabled *bool
@ -4427,7 +4458,7 @@ type ResourceSKUsResult struct {
type ResourceSharingProfile struct {
// Specifies an array of subscription resource IDs that capacity reservation group is shared with. Note: Minimum api-version:
// 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more
// 2024-03-01. Please refer to https://aka.ms/computereservationsharing for more
// details.
SubscriptionIDs []*SubResource
}
@ -5117,6 +5148,24 @@ type ScaleInPolicy struct {
Rules []*VirtualMachineScaleSetScaleInRules
}
type ScheduledEventsAdditionalPublishingTargets struct {
// The configuration parameters used while creating eventGridAndResourceGraph Scheduled Event setting.
EventGridAndResourceGraph *EventGridAndResourceGraph
}
// ScheduledEventsPolicy - Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related
// configurations.
type ScheduledEventsPolicy struct {
// The configuration parameters used while publishing scheduledEventsAdditionalPublishingTargets.
ScheduledEventsAdditionalPublishingTargets *ScheduledEventsAdditionalPublishingTargets
// The configuration parameters used while creating userInitiatedReboot scheduled event setting creation.
UserInitiatedReboot *UserInitiatedReboot
// The configuration parameters used while creating userInitiatedRedeploy scheduled event setting creation.
UserInitiatedRedeploy *UserInitiatedRedeploy
}
type ScheduledEventsProfile struct {
// Specifies OS Image Scheduled Event related configurations.
OSImageNotificationProfile *OSImageNotificationProfile
@ -5146,7 +5195,7 @@ type SecurityProfile struct {
// Specifies the Managed Identity used by ADE to get access token for keyvault operations.
EncryptionIdentity *EncryptionIdentity
// Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2023-09-01.
// Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2024-03-01.
ProxyAgentSettings *ProxyAgentSettings
// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The
@ -5938,6 +5987,18 @@ type UserAssignedIdentitiesValue struct {
PrincipalID *string
}
// UserInitiatedReboot - Specifies Reboot related Scheduled Event related configurations.
type UserInitiatedReboot struct {
// Specifies Reboot Scheduled Event related configurations.
AutomaticallyApprove *bool
}
// UserInitiatedRedeploy - Specifies Redeploy related Scheduled Event related configurations.
type UserInitiatedRedeploy struct {
// Specifies Redeploy Scheduled Event related configurations.
AutomaticallyApprove *bool
}
// VMDiskSecurityProfile - Specifies the security profile settings for the managed disk. Note: It can only be set for Confidential
// VMs.
type VMDiskSecurityProfile struct {
@ -6782,6 +6843,10 @@ type VirtualMachineProperties struct {
// 2018-04-01.
ProximityPlacementGroup *SubResource
// Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the
// virtual machine.
ScheduledEventsPolicy *ScheduledEventsPolicy
// Specifies Scheduled Event related configurations.
ScheduledEventsProfile *ScheduledEventsProfile
@ -7592,6 +7657,9 @@ type VirtualMachineScaleSetProperties struct {
// Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
ScaleInPolicy *ScaleInPolicy
// The ScheduledEventsPolicy.
ScheduledEventsPolicy *ScheduledEventsPolicy
// When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup
// is true, it may be modified to false. However, if singlePlacementGroup
// is false, it may not be modified to true.
@ -7676,6 +7744,9 @@ type VirtualMachineScaleSetReimageParameters struct {
// is reimaged to the existing version of OS Disk.
ExactVersion *string
// Parameter to force update ephemeral OS disk for a virtual machine scale set VM
ForceUpdateOSDiskForEphemeral *bool
// The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation
// being performed on all virtual machines in the virtual machine scale set.
InstanceIDs []*string
@ -7869,6 +7940,9 @@ type VirtualMachineScaleSetUpdateOSDisk struct {
// delete option for Ephemeral OS Disk.
DeleteOption *DiskDeleteOptionTypes
// Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
DiffDiskSettings *DiffDiskSettings
// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
// virtual machine image.
// diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023
@ -8277,8 +8351,8 @@ type VirtualMachineScaleSetVMProfile struct {
UserData *string
// READ-ONLY; Specifies the time in which this VM profile for the Virtual Machine Scale Set was created. Minimum API version
// for this property is 2023-09-01. This value will be added to VMSS Flex VM tags when
// creating/updating the VMSS VM Profile with minimum api-version 2023-09-01.
// for this property is 2024-03-01. This value will be added to VMSS Flex VM tags when
// creating/updating the VMSS VM Profile with minimum api-version 2024-03-01.
TimeCreated *time.Time
}
@ -8375,6 +8449,9 @@ type VirtualMachineScaleSetVMReimageParameters struct {
// is reimaged to the existing version of OS Disk.
ExactVersion *string
// Parameter to force update ephemeral OS disk for a virtual machine scale set VM
ForceUpdateOSDiskForEphemeral *bool
// Specifies information required for reimaging the non-ephemeral OS disk.
OSProfile *OSProfileProvisioningData

View file

@ -2484,6 +2484,7 @@ func (d DataDisk) MarshalJSON() ([]byte, error) {
populate(objectMap, "lun", d.Lun)
populate(objectMap, "managedDisk", d.ManagedDisk)
populate(objectMap, "name", d.Name)
populate(objectMap, "sourceResource", d.SourceResource)
populate(objectMap, "toBeDetached", d.ToBeDetached)
populate(objectMap, "vhd", d.Vhd)
populate(objectMap, "writeAcceleratorEnabled", d.WriteAcceleratorEnabled)
@ -2532,6 +2533,9 @@ func (d *DataDisk) UnmarshalJSON(data []byte) error {
case "name":
err = unpopulate(val, "Name", &d.Name)
delete(rawMsg, key)
case "sourceResource":
err = unpopulate(val, "SourceResource", &d.SourceResource)
delete(rawMsg, key)
case "toBeDetached":
err = unpopulate(val, "ToBeDetached", &d.ToBeDetached)
delete(rawMsg, key)
@ -2610,8 +2614,12 @@ func (d *DataDiskImageEncryption) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type DataDisksToAttach.
func (d DataDisksToAttach) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "caching", d.Caching)
populate(objectMap, "deleteOption", d.DeleteOption)
populate(objectMap, "diskEncryptionSet", d.DiskEncryptionSet)
populate(objectMap, "diskId", d.DiskID)
populate(objectMap, "lun", d.Lun)
populate(objectMap, "writeAcceleratorEnabled", d.WriteAcceleratorEnabled)
return json.Marshal(objectMap)
}
@ -2624,12 +2632,24 @@ func (d *DataDisksToAttach) UnmarshalJSON(data []byte) error {
for key, val := range rawMsg {
var err error
switch key {
case "caching":
err = unpopulate(val, "Caching", &d.Caching)
delete(rawMsg, key)
case "deleteOption":
err = unpopulate(val, "DeleteOption", &d.DeleteOption)
delete(rawMsg, key)
case "diskEncryptionSet":
err = unpopulate(val, "DiskEncryptionSet", &d.DiskEncryptionSet)
delete(rawMsg, key)
case "diskId":
err = unpopulate(val, "DiskID", &d.DiskID)
delete(rawMsg, key)
case "lun":
err = unpopulate(val, "Lun", &d.Lun)
delete(rawMsg, key)
case "writeAcceleratorEnabled":
err = unpopulate(val, "WriteAcceleratorEnabled", &d.WriteAcceleratorEnabled)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", d, err)
@ -4749,6 +4769,33 @@ func (e *EncryptionSettingsElement) UnmarshalJSON(data []byte) error {
return nil
}
// MarshalJSON implements the json.Marshaller interface for type EventGridAndResourceGraph.
func (e EventGridAndResourceGraph) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "enable", e.Enable)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridAndResourceGraph.
func (e *EventGridAndResourceGraph) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", e, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "enable":
err = unpopulate(val, "Enable", &e.Enable)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", e, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation.
func (e ExtendedLocation) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@ -5492,6 +5539,7 @@ func (g GalleryArtifactVersionFullSource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "communityGalleryImageId", g.CommunityGalleryImageID)
populate(objectMap, "id", g.ID)
populate(objectMap, "virtualMachineId", g.VirtualMachineID)
return json.Marshal(objectMap)
}
@ -5510,6 +5558,9 @@ func (g *GalleryArtifactVersionFullSource) UnmarshalJSON(data []byte) error {
case "id":
err = unpopulate(val, "ID", &g.ID)
delete(rawMsg, key)
case "virtualMachineId":
err = unpopulate(val, "VirtualMachineID", &g.VirtualMachineID)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", g, err)
@ -12307,6 +12358,68 @@ func (s *ScaleInPolicy) UnmarshalJSON(data []byte) error {
return nil
}
// MarshalJSON implements the json.Marshaller interface for type ScheduledEventsAdditionalPublishingTargets.
func (s ScheduledEventsAdditionalPublishingTargets) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "eventGridAndResourceGraph", s.EventGridAndResourceGraph)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduledEventsAdditionalPublishingTargets.
func (s *ScheduledEventsAdditionalPublishingTargets) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", s, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "eventGridAndResourceGraph":
err = unpopulate(val, "EventGridAndResourceGraph", &s.EventGridAndResourceGraph)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", s, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type ScheduledEventsPolicy.
func (s ScheduledEventsPolicy) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "scheduledEventsAdditionalPublishingTargets", s.ScheduledEventsAdditionalPublishingTargets)
populate(objectMap, "userInitiatedReboot", s.UserInitiatedReboot)
populate(objectMap, "userInitiatedRedeploy", s.UserInitiatedRedeploy)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduledEventsPolicy.
func (s *ScheduledEventsPolicy) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", s, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "scheduledEventsAdditionalPublishingTargets":
err = unpopulate(val, "ScheduledEventsAdditionalPublishingTargets", &s.ScheduledEventsAdditionalPublishingTargets)
delete(rawMsg, key)
case "userInitiatedReboot":
err = unpopulate(val, "UserInitiatedReboot", &s.UserInitiatedReboot)
delete(rawMsg, key)
case "userInitiatedRedeploy":
err = unpopulate(val, "UserInitiatedRedeploy", &s.UserInitiatedRedeploy)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", s, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type ScheduledEventsProfile.
func (s ScheduledEventsProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@ -14452,6 +14565,60 @@ func (u *UserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error {
return nil
}
// MarshalJSON implements the json.Marshaller interface for type UserInitiatedReboot.
func (u UserInitiatedReboot) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "automaticallyApprove", u.AutomaticallyApprove)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type UserInitiatedReboot.
func (u *UserInitiatedReboot) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", u, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "automaticallyApprove":
err = unpopulate(val, "AutomaticallyApprove", &u.AutomaticallyApprove)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", u, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type UserInitiatedRedeploy.
func (u UserInitiatedRedeploy) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "automaticallyApprove", u.AutomaticallyApprove)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type UserInitiatedRedeploy.
func (u *UserInitiatedRedeploy) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", u, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "automaticallyApprove":
err = unpopulate(val, "AutomaticallyApprove", &u.AutomaticallyApprove)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", u, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type VMDiskSecurityProfile.
func (v VMDiskSecurityProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@ -16139,6 +16306,7 @@ func (v VirtualMachineProperties) MarshalJSON() ([]byte, error) {
populate(objectMap, "priority", v.Priority)
populate(objectMap, "provisioningState", v.ProvisioningState)
populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup)
populate(objectMap, "scheduledEventsPolicy", v.ScheduledEventsPolicy)
populate(objectMap, "scheduledEventsProfile", v.ScheduledEventsProfile)
populate(objectMap, "securityProfile", v.SecurityProfile)
populate(objectMap, "storageProfile", v.StorageProfile)
@ -16215,6 +16383,9 @@ func (v *VirtualMachineProperties) UnmarshalJSON(data []byte) error {
case "proximityPlacementGroup":
err = unpopulate(val, "ProximityPlacementGroup", &v.ProximityPlacementGroup)
delete(rawMsg, key)
case "scheduledEventsPolicy":
err = unpopulate(val, "ScheduledEventsPolicy", &v.ScheduledEventsPolicy)
delete(rawMsg, key)
case "scheduledEventsProfile":
err = unpopulate(val, "ScheduledEventsProfile", &v.ScheduledEventsProfile)
delete(rawMsg, key)
@ -17733,6 +17904,7 @@ func (v VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup)
populate(objectMap, "resiliencyPolicy", v.ResiliencyPolicy)
populate(objectMap, "scaleInPolicy", v.ScaleInPolicy)
populate(objectMap, "scheduledEventsPolicy", v.ScheduledEventsPolicy)
populate(objectMap, "singlePlacementGroup", v.SinglePlacementGroup)
populate(objectMap, "spotRestorePolicy", v.SpotRestorePolicy)
populateDateTimeRFC3339(objectMap, "timeCreated", v.TimeCreated)
@ -17791,6 +17963,9 @@ func (v *VirtualMachineScaleSetProperties) UnmarshalJSON(data []byte) error {
case "scaleInPolicy":
err = unpopulate(val, "ScaleInPolicy", &v.ScaleInPolicy)
delete(rawMsg, key)
case "scheduledEventsPolicy":
err = unpopulate(val, "ScheduledEventsPolicy", &v.ScheduledEventsPolicy)
delete(rawMsg, key)
case "singlePlacementGroup":
err = unpopulate(val, "SinglePlacementGroup", &v.SinglePlacementGroup)
delete(rawMsg, key)
@ -17937,6 +18112,7 @@ func (v *VirtualMachineScaleSetPublicIPAddressConfigurationProperties) Unmarshal
func (v VirtualMachineScaleSetReimageParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "exactVersion", v.ExactVersion)
populate(objectMap, "forceUpdateOSDiskForEphemeral", v.ForceUpdateOSDiskForEphemeral)
populate(objectMap, "instanceIds", v.InstanceIDs)
populate(objectMap, "osProfile", v.OSProfile)
populate(objectMap, "tempDisk", v.TempDisk)
@ -17955,6 +18131,9 @@ func (v *VirtualMachineScaleSetReimageParameters) UnmarshalJSON(data []byte) err
case "exactVersion":
err = unpopulate(val, "ExactVersion", &v.ExactVersion)
delete(rawMsg, key)
case "forceUpdateOSDiskForEphemeral":
err = unpopulate(val, "ForceUpdateOSDiskForEphemeral", &v.ForceUpdateOSDiskForEphemeral)
delete(rawMsg, key)
case "instanceIds":
err = unpopulate(val, "InstanceIDs", &v.InstanceIDs)
delete(rawMsg, key)
@ -18352,6 +18531,7 @@ func (v VirtualMachineScaleSetUpdateOSDisk) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "caching", v.Caching)
populate(objectMap, "deleteOption", v.DeleteOption)
populate(objectMap, "diffDiskSettings", v.DiffDiskSettings)
populate(objectMap, "diskSizeGB", v.DiskSizeGB)
populate(objectMap, "image", v.Image)
populate(objectMap, "managedDisk", v.ManagedDisk)
@ -18375,6 +18555,9 @@ func (v *VirtualMachineScaleSetUpdateOSDisk) UnmarshalJSON(data []byte) error {
case "deleteOption":
err = unpopulate(val, "DeleteOption", &v.DeleteOption)
delete(rawMsg, key)
case "diffDiskSettings":
err = unpopulate(val, "DiffDiskSettings", &v.DiffDiskSettings)
delete(rawMsg, key)
case "diskSizeGB":
err = unpopulate(val, "DiskSizeGB", &v.DiskSizeGB)
delete(rawMsg, key)
@ -19323,6 +19506,7 @@ func (v *VirtualMachineScaleSetVMProtectionPolicy) UnmarshalJSON(data []byte) er
func (v VirtualMachineScaleSetVMReimageParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "exactVersion", v.ExactVersion)
populate(objectMap, "forceUpdateOSDiskForEphemeral", v.ForceUpdateOSDiskForEphemeral)
populate(objectMap, "osProfile", v.OSProfile)
populate(objectMap, "tempDisk", v.TempDisk)
return json.Marshal(objectMap)
@ -19340,6 +19524,9 @@ func (v *VirtualMachineScaleSetVMReimageParameters) UnmarshalJSON(data []byte) e
case "exactVersion":
err = unpopulate(val, "ExactVersion", &v.ExactVersion)
delete(rawMsg, key)
case "forceUpdateOSDiskForEphemeral":
err = unpopulate(val, "ForceUpdateOSDiskForEphemeral", &v.ForceUpdateOSDiskForEphemeral)
delete(rawMsg, key)
case "osProfile":
err = unpopulate(val, "OSProfile", &v.OSProfile)
delete(rawMsg, key)
@ -19769,7 +19956,7 @@ func populateAny(m map[string]any, k string, v any) {
}
func unpopulate(data json.RawMessage, fn string, v any) error {
if data == nil {
if data == nil || string(data) == "null" {
return nil
}
if err := json.Unmarshal(data, v); err != nil {

View file

@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO
// NewListPager - Gets a list of compute operations.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] {
return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{
@ -73,7 +73,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options *
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -84,6 +84,13 @@ type CapacityReservationGroupsClientListBySubscriptionOptions struct {
// VM Instance or both resource Ids which are associated to capacity
// reservation group in the response.
Expand *ExpandTypesForGetCapacityReservationGroups
// The query option to fetch Capacity Reservation Group Resource Ids.
// 'CreatedInSubscription' enables fetching Resource Ids for all capacity reservation group resources created in the subscription.
// 'SharedWithSubscription' enables fetching Resource Ids for all capacity reservation group resources shared with the subscription.
// 'All' enables fetching Resource Ids for all capacity reservation group resources shared with the subscription and created
// in the subscription.
ResourceIDsOnly *ResourceIDOptionsForGetCapacityReservationGroups
}
// CapacityReservationGroupsClientUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.Update

View file

@ -47,7 +47,7 @@ func NewProximityPlacementGroupsClient(subscriptionID string, credential azcore.
// CreateOrUpdate - Create or update a proximity placement group.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - proximityPlacementGroupName - The name of the proximity placement group.
// - parameters - Parameters supplied to the Create Proximity Placement Group operation.
@ -95,7 +95,7 @@ func (client *ProximityPlacementGroupsClient) createOrUpdateCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -116,7 +116,7 @@ func (client *ProximityPlacementGroupsClient) createOrUpdateHandleResponse(resp
// Delete - Delete a proximity placement group.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - proximityPlacementGroupName - The name of the proximity placement group.
// - options - ProximityPlacementGroupsClientDeleteOptions contains the optional parameters for the ProximityPlacementGroupsClient.Delete
@ -162,7 +162,7 @@ func (client *ProximityPlacementGroupsClient) deleteCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -171,7 +171,7 @@ func (client *ProximityPlacementGroupsClient) deleteCreateRequest(ctx context.Co
// Get - Retrieves information about a proximity placement group .
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - proximityPlacementGroupName - The name of the proximity placement group.
// - options - ProximityPlacementGroupsClientGetOptions contains the optional parameters for the ProximityPlacementGroupsClient.Get
@ -218,10 +218,10 @@ func (client *ProximityPlacementGroupsClient) getCreateRequest(ctx context.Conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.IncludeColocationStatus != nil {
reqQP.Set("includeColocationStatus", *options.IncludeColocationStatus)
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -238,7 +238,7 @@ func (client *ProximityPlacementGroupsClient) getHandleResponse(resp *http.Respo
// NewListByResourceGroupPager - Lists all proximity placement groups in a resource group.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - ProximityPlacementGroupsClientListByResourceGroupOptions contains the optional parameters for the ProximityPlacementGroupsClient.NewListByResourceGroupPager
// method.
@ -281,7 +281,7 @@ func (client *ProximityPlacementGroupsClient) listByResourceGroupCreateRequest(c
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -298,7 +298,7 @@ func (client *ProximityPlacementGroupsClient) listByResourceGroupHandleResponse(
// NewListBySubscriptionPager - Lists all proximity placement groups in a subscription.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - ProximityPlacementGroupsClientListBySubscriptionOptions contains the optional parameters for the ProximityPlacementGroupsClient.NewListBySubscriptionPager
// method.
func (client *ProximityPlacementGroupsClient) NewListBySubscriptionPager(options *ProximityPlacementGroupsClientListBySubscriptionOptions) *runtime.Pager[ProximityPlacementGroupsClientListBySubscriptionResponse] {
@ -336,7 +336,7 @@ func (client *ProximityPlacementGroupsClient) listBySubscriptionCreateRequest(ct
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -354,7 +354,7 @@ func (client *ProximityPlacementGroupsClient) listBySubscriptionHandleResponse(r
// Update - Update a proximity placement group.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - proximityPlacementGroupName - The name of the proximity placement group.
// - parameters - Parameters supplied to the Update Proximity Placement Group operation.
@ -402,7 +402,7 @@ func (client *ProximityPlacementGroupsClient) updateCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -83,10 +83,10 @@ func (client *ResourceSKUsClient) listCreateRequest(ctx context.Context, options
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2021-07-01")
if options != nil && options.Filter != nil {
reqQP.Set("$filter", *options.Filter)
}
reqQP.Set("api-version", "2021-07-01")
if options != nil && options.IncludeExtendedLocations != nil {
reqQP.Set("includeExtendedLocations", *options.IncludeExtendedLocations)
}

View file

@ -48,7 +48,7 @@ func NewRestorePointCollectionsClient(subscriptionID string, credential azcore.T
// for more details. When updating a restore point collection, only tags may be modified.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - restorePointCollectionName - The name of the restore point collection.
// - parameters - Parameters supplied to the Create or Update restore point collection operation.
@ -96,7 +96,7 @@ func (client *RestorePointCollectionsClient) createOrUpdateCreateRequest(ctx con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -118,7 +118,7 @@ func (client *RestorePointCollectionsClient) createOrUpdateHandleResponse(resp *
// points.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - restorePointCollectionName - The name of the Restore Point Collection.
// - options - RestorePointCollectionsClientBeginDeleteOptions contains the optional parameters for the RestorePointCollectionsClient.BeginDelete
@ -144,7 +144,7 @@ func (client *RestorePointCollectionsClient) BeginDelete(ctx context.Context, re
// points.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *RestorePointCollectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, restorePointCollectionName string, options *RestorePointCollectionsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "RestorePointCollectionsClient.BeginDelete"
@ -186,7 +186,7 @@ func (client *RestorePointCollectionsClient) deleteCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -195,7 +195,7 @@ func (client *RestorePointCollectionsClient) deleteCreateRequest(ctx context.Con
// Get - The operation to get the restore point collection.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - restorePointCollectionName - The name of the restore point collection.
// - options - RestorePointCollectionsClientGetOptions contains the optional parameters for the RestorePointCollectionsClient.Get
@ -245,7 +245,7 @@ func (client *RestorePointCollectionsClient) getCreateRequest(ctx context.Contex
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -262,7 +262,7 @@ func (client *RestorePointCollectionsClient) getHandleResponse(resp *http.Respon
// NewListPager - Gets the list of restore point collections in a resource group.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - RestorePointCollectionsClientListOptions contains the optional parameters for the RestorePointCollectionsClient.NewListPager
// method.
@ -305,7 +305,7 @@ func (client *RestorePointCollectionsClient) listCreateRequest(ctx context.Conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -324,7 +324,7 @@ func (client *RestorePointCollectionsClient) listHandleResponse(resp *http.Respo
// to get the next page of restore point collections. Do this till nextLink is not null to fetch all
// the restore point collections.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - RestorePointCollectionsClientListAllOptions contains the optional parameters for the RestorePointCollectionsClient.NewListAllPager
// method.
func (client *RestorePointCollectionsClient) NewListAllPager(options *RestorePointCollectionsClientListAllOptions) *runtime.Pager[RestorePointCollectionsClientListAllResponse] {
@ -362,7 +362,7 @@ func (client *RestorePointCollectionsClient) listAllCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -380,7 +380,7 @@ func (client *RestorePointCollectionsClient) listAllHandleResponse(resp *http.Re
// Update - The operation to update the restore point collection.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - restorePointCollectionName - The name of the restore point collection.
// - parameters - Parameters supplied to the Update restore point collection operation.
@ -428,7 +428,7 @@ func (client *RestorePointCollectionsClient) updateCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -47,7 +47,7 @@ func NewRestorePointsClient(subscriptionID string, credential azcore.TokenCreden
// BeginCreate - The operation to create the restore point. Updating properties of an existing restore point is not allowed
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - restorePointCollectionName - The name of the restore point collection.
// - restorePointName - The name of the restore point.
@ -74,7 +74,7 @@ func (client *RestorePointsClient) BeginCreate(ctx context.Context, resourceGrou
// Create - The operation to create the restore point. Updating properties of an existing restore point is not allowed
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *RestorePointsClient) create(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint, options *RestorePointsClientBeginCreateOptions) (*http.Response, error) {
var err error
const operationName = "RestorePointsClient.BeginCreate"
@ -120,7 +120,7 @@ func (client *RestorePointsClient) createCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -132,7 +132,7 @@ func (client *RestorePointsClient) createCreateRequest(ctx context.Context, reso
// BeginDelete - The operation to delete the restore point.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - restorePointCollectionName - The name of the Restore Point Collection.
// - restorePointName - The name of the restore point.
@ -158,7 +158,7 @@ func (client *RestorePointsClient) BeginDelete(ctx context.Context, resourceGrou
// Delete - The operation to delete the restore point.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *RestorePointsClient) deleteOperation(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "RestorePointsClient.BeginDelete"
@ -204,7 +204,7 @@ func (client *RestorePointsClient) deleteCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -213,7 +213,7 @@ func (client *RestorePointsClient) deleteCreateRequest(ctx context.Context, reso
// Get - The operation to get the restore point.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - restorePointCollectionName - The name of the restore point collection.
// - restorePointName - The name of the restore point.
@ -267,7 +267,7 @@ func (client *RestorePointsClient) getCreateRequest(ctx context.Context, resourc
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -47,7 +47,7 @@ func NewSharedGalleriesClient(subscriptionID string, credential azcore.TokenCred
// Get - Get a shared gallery by subscription id or tenant id.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - galleryUniqueName - The unique name of the Shared Gallery.
// - options - SharedGalleriesClientGetOptions contains the optional parameters for the SharedGalleriesClient.Get method.
@ -93,7 +93,7 @@ func (client *SharedGalleriesClient) getCreateRequest(ctx context.Context, locat
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -110,7 +110,7 @@ func (client *SharedGalleriesClient) getHandleResponse(resp *http.Response) (Sha
// NewListPager - List shared galleries by subscription id or tenant id.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - options - SharedGalleriesClientListOptions contains the optional parameters for the SharedGalleriesClient.NewListPager
// method.
@ -153,7 +153,7 @@ func (client *SharedGalleriesClient) listCreateRequest(ctx context.Context, loca
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
if options != nil && options.SharedTo != nil {
reqQP.Set("sharedTo", string(*options.SharedTo))
}

View file

@ -47,7 +47,7 @@ func NewSharedGalleryImagesClient(subscriptionID string, credential azcore.Token
// Get - Get a shared gallery image by subscription id or tenant id.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - galleryUniqueName - The unique name of the Shared Gallery.
// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
@ -98,7 +98,7 @@ func (client *SharedGalleryImagesClient) getCreateRequest(ctx context.Context, l
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -115,7 +115,7 @@ func (client *SharedGalleryImagesClient) getHandleResponse(resp *http.Response)
// NewListPager - List shared gallery images by subscription id or tenant id.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - galleryUniqueName - The unique name of the Shared Gallery.
// - options - SharedGalleryImagesClientListOptions contains the optional parameters for the SharedGalleryImagesClient.NewListPager
@ -163,7 +163,7 @@ func (client *SharedGalleryImagesClient) listCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
if options != nil && options.SharedTo != nil {
reqQP.Set("sharedTo", string(*options.SharedTo))
}

View file

@ -47,7 +47,7 @@ func NewSharedGalleryImageVersionsClient(subscriptionID string, credential azcor
// Get - Get a shared gallery image version by subscription id or tenant id.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - galleryUniqueName - The unique name of the Shared Gallery.
// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
@ -106,7 +106,7 @@ func (client *SharedGalleryImageVersionsClient) getCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -123,7 +123,7 @@ func (client *SharedGalleryImageVersionsClient) getHandleResponse(resp *http.Res
// NewListPager - List shared gallery image versions by subscription id or tenant id.
//
// Generated from API version 2022-08-03
// Generated from API version 2023-07-03
// - location - Resource location.
// - galleryUniqueName - The unique name of the Shared Gallery.
// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
@ -176,7 +176,7 @@ func (client *SharedGalleryImageVersionsClient) listCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2022-08-03")
reqQP.Set("api-version", "2023-07-03")
if options != nil && options.SharedTo != nil {
reqQP.Set("sharedTo", string(*options.SharedTo))
}

View file

@ -47,7 +47,7 @@ func NewSSHPublicKeysClient(subscriptionID string, credential azcore.TokenCreden
// Create - Creates a new SSH public key resource.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - sshPublicKeyName - The name of the SSH public key.
// - parameters - Parameters supplied to create the SSH public key.
@ -94,7 +94,7 @@ func (client *SSHPublicKeysClient) createCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -115,7 +115,7 @@ func (client *SSHPublicKeysClient) createHandleResponse(resp *http.Response) (SS
// Delete - Delete an SSH public key.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - sshPublicKeyName - The name of the SSH public key.
// - options - SSHPublicKeysClientDeleteOptions contains the optional parameters for the SSHPublicKeysClient.Delete method.
@ -160,7 +160,7 @@ func (client *SSHPublicKeysClient) deleteCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -171,7 +171,7 @@ func (client *SSHPublicKeysClient) deleteCreateRequest(ctx context.Context, reso
// SSH public key resource.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - sshPublicKeyName - The name of the SSH public key.
// - options - SSHPublicKeysClientGenerateKeyPairOptions contains the optional parameters for the SSHPublicKeysClient.GenerateKeyPair
@ -218,7 +218,7 @@ func (client *SSHPublicKeysClient) generateKeyPairCreateRequest(ctx context.Cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Parameters != nil {
@ -242,7 +242,7 @@ func (client *SSHPublicKeysClient) generateKeyPairHandleResponse(resp *http.Resp
// Get - Retrieves information about an SSH public key.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - sshPublicKeyName - The name of the SSH public key.
// - options - SSHPublicKeysClientGetOptions contains the optional parameters for the SSHPublicKeysClient.Get method.
@ -288,7 +288,7 @@ func (client *SSHPublicKeysClient) getCreateRequest(ctx context.Context, resourc
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -306,7 +306,7 @@ func (client *SSHPublicKeysClient) getHandleResponse(resp *http.Response) (SSHPu
// NewListByResourceGroupPager - Lists all of the SSH public keys in the specified resource group. Use the nextLink property
// in the response to get the next page of SSH public keys.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - SSHPublicKeysClientListByResourceGroupOptions contains the optional parameters for the SSHPublicKeysClient.NewListByResourceGroupPager
// method.
@ -349,7 +349,7 @@ func (client *SSHPublicKeysClient) listByResourceGroupCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -367,7 +367,7 @@ func (client *SSHPublicKeysClient) listByResourceGroupHandleResponse(resp *http.
// NewListBySubscriptionPager - Lists all of the SSH public keys in the subscription. Use the nextLink property in the response
// to get the next page of SSH public keys.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - SSHPublicKeysClientListBySubscriptionOptions contains the optional parameters for the SSHPublicKeysClient.NewListBySubscriptionPager
// method.
func (client *SSHPublicKeysClient) NewListBySubscriptionPager(options *SSHPublicKeysClientListBySubscriptionOptions) *runtime.Pager[SSHPublicKeysClientListBySubscriptionResponse] {
@ -405,7 +405,7 @@ func (client *SSHPublicKeysClient) listBySubscriptionCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -423,7 +423,7 @@ func (client *SSHPublicKeysClient) listBySubscriptionHandleResponse(resp *http.R
// Update - Updates a new SSH public key resource.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - sshPublicKeyName - The name of the SSH public key.
// - parameters - Parameters supplied to update the SSH public key.
@ -470,7 +470,7 @@ func (client *SSHPublicKeysClient) updateCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

View file

@ -19,12 +19,16 @@ import (
)
// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases.
var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`)
var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`)
const (
utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"`
utcDateTime = "2006-01-02T15:04:05.999999999"
dateTimeJSON = `"` + time.RFC3339Nano + `"`
utcDateTime = "2006-01-02T15:04:05.999999999"
utcDateTimeJSON = `"` + utcDateTime + `"`
utcDateTimeNoT = "2006-01-02 15:04:05.999999999"
utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"`
dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00`
dateTimeJSON = `"` + time.RFC3339Nano + `"`
dateTimeJSONNoT = `"` + dateTimeNoT + `"`
)
type dateTimeRFC3339 time.Time
@ -40,17 +44,33 @@ func (t dateTimeRFC3339) MarshalText() ([]byte, error) {
}
func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error {
layout := utcDateTimeJSON
if tzOffsetRegex.Match(data) {
tzOffset := tzOffsetRegex.Match(data)
hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t")
var layout string
if tzOffset && hasT {
layout = dateTimeJSON
} else if tzOffset {
layout = dateTimeJSONNoT
} else if hasT {
layout = utcDateTimeJSON
} else {
layout = utcDateTimeJSONNoT
}
return t.Parse(layout, string(data))
}
func (t *dateTimeRFC3339) UnmarshalText(data []byte) error {
layout := utcDateTime
if tzOffsetRegex.Match(data) {
tzOffset := tzOffsetRegex.Match(data)
hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t")
var layout string
if tzOffset && hasT {
layout = time.RFC3339Nano
} else if tzOffset {
layout = dateTimeNoT
} else if hasT {
layout = utcDateTime
} else {
layout = utcDateTimeNoT
}
return t.Parse(layout, string(data))
}
@ -61,6 +81,10 @@ func (t *dateTimeRFC3339) Parse(layout, value string) error {
return err
}
func (t dateTimeRFC3339) String() string {
return time.Time(t).Format(time.RFC3339Nano)
}
func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) {
if t == nil {
return
@ -74,7 +98,7 @@ func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) {
}
func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error {
if data == nil || strings.EqualFold(string(data), "null") {
if data == nil || string(data) == "null" {
return nil
}
var aux dateTimeRFC3339

View file

@ -47,7 +47,7 @@ func NewUsageClient(subscriptionID string, credential azcore.TokenCredential, op
// NewListPager - Gets, for the specified location, the current compute resource usage information as well as the limits for
// compute resources under the subscription.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The location for which resource usage is queried.
// - options - UsageClientListOptions contains the optional parameters for the UsageClient.NewListPager method.
func (client *UsageClient) NewListPager(location string, options *UsageClientListOptions) *runtime.Pager[UsageClientListResponse] {
@ -89,7 +89,7 @@ func (client *UsageClient) listCreateRequest(ctx context.Context, location strin
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -48,7 +48,7 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string, credential az
// Get - Gets a virtual machine extension image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - options - VirtualMachineExtensionImagesClientGetOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.Get
// method.
@ -102,7 +102,7 @@ func (client *VirtualMachineExtensionImagesClient) getCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -120,7 +120,7 @@ func (client *VirtualMachineExtensionImagesClient) getHandleResponse(resp *http.
// ListTypes - Gets a list of virtual machine extension image types.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - options - VirtualMachineExtensionImagesClientListTypesOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListTypes
// method.
@ -166,7 +166,7 @@ func (client *VirtualMachineExtensionImagesClient) listTypesCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -184,7 +184,7 @@ func (client *VirtualMachineExtensionImagesClient) listTypesHandleResponse(resp
// ListVersions - Gets a list of virtual machine extension image versions.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - options - VirtualMachineExtensionImagesClientListVersionsOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListVersions
// method.
@ -237,13 +237,13 @@ func (client *VirtualMachineExtensionImagesClient) listVersionsCreateRequest(ctx
if options != nil && options.Filter != nil {
reqQP.Set("$filter", *options.Filter)
}
if options != nil && options.Top != nil {
reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
}
if options != nil && options.Orderby != nil {
reqQP.Set("$orderby", *options.Orderby)
}
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.Top != nil {
reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
}
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -47,7 +47,7 @@ func NewVirtualMachineExtensionsClient(subscriptionID string, credential azcore.
// BeginCreateOrUpdate - The operation to create or update the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine where the extension should be created or updated.
// - vmExtensionName - The name of the virtual machine extension.
@ -74,7 +74,7 @@ func (client *VirtualMachineExtensionsClient) BeginCreateOrUpdate(ctx context.Co
// CreateOrUpdate - The operation to create or update the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtension, options *VirtualMachineExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineExtensionsClient.BeginCreateOrUpdate"
@ -120,7 +120,7 @@ func (client *VirtualMachineExtensionsClient) createOrUpdateCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
@ -132,7 +132,7 @@ func (client *VirtualMachineExtensionsClient) createOrUpdateCreateRequest(ctx co
// BeginDelete - The operation to delete the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine where the extension should be deleted.
// - vmExtensionName - The name of the virtual machine extension.
@ -158,7 +158,7 @@ func (client *VirtualMachineExtensionsClient) BeginDelete(ctx context.Context, r
// Delete - The operation to delete the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, options *VirtualMachineExtensionsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineExtensionsClient.BeginDelete"
@ -204,7 +204,7 @@ func (client *VirtualMachineExtensionsClient) deleteCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -213,7 +213,7 @@ func (client *VirtualMachineExtensionsClient) deleteCreateRequest(ctx context.Co
// Get - The operation to get the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine containing the extension.
// - vmExtensionName - The name of the virtual machine extension.
@ -268,7 +268,7 @@ func (client *VirtualMachineExtensionsClient) getCreateRequest(ctx context.Conte
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -286,7 +286,7 @@ func (client *VirtualMachineExtensionsClient) getHandleResponse(resp *http.Respo
// List - The operation to get all extensions of a Virtual Machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine containing the extension.
// - options - VirtualMachineExtensionsClientListOptions contains the optional parameters for the VirtualMachineExtensionsClient.List
@ -336,7 +336,7 @@ func (client *VirtualMachineExtensionsClient) listCreateRequest(ctx context.Cont
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -354,7 +354,7 @@ func (client *VirtualMachineExtensionsClient) listHandleResponse(resp *http.Resp
// BeginUpdate - The operation to update the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine where the extension should be updated.
// - vmExtensionName - The name of the virtual machine extension.
@ -381,7 +381,7 @@ func (client *VirtualMachineExtensionsClient) BeginUpdate(ctx context.Context, r
// Update - The operation to update the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineExtensionsClient) update(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtensionUpdate, options *VirtualMachineExtensionsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineExtensionsClient.BeginUpdate"
@ -427,7 +427,7 @@ func (client *VirtualMachineExtensionsClient) updateCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {

View file

@ -48,7 +48,7 @@ func NewVirtualMachineImagesClient(subscriptionID string, credential azcore.Toke
// Get - Gets a virtual machine image.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - publisherName - A valid image publisher.
// - offer - A valid image publisher offer.
@ -110,7 +110,7 @@ func (client *VirtualMachineImagesClient) getCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -128,7 +128,7 @@ func (client *VirtualMachineImagesClient) getHandleResponse(resp *http.Response)
// List - Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - publisherName - A valid image publisher.
// - offer - A valid image publisher offer.
@ -188,13 +188,13 @@ func (client *VirtualMachineImagesClient) listCreateRequest(ctx context.Context,
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
if options != nil && options.Top != nil {
reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
}
if options != nil && options.Orderby != nil {
reqQP.Set("$orderby", *options.Orderby)
}
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.Top != nil {
reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
}
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -212,7 +212,7 @@ func (client *VirtualMachineImagesClient) listHandleResponse(resp *http.Response
// ListByEdgeZone - Gets a list of all virtual machine image versions for the specified edge zone
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - edgeZone - The name of the edge zone.
// - options - VirtualMachineImagesClientListByEdgeZoneOptions contains the optional parameters for the VirtualMachineImagesClient.ListByEdgeZone
@ -259,7 +259,7 @@ func (client *VirtualMachineImagesClient) listByEdgeZoneCreateRequest(ctx contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -277,7 +277,7 @@ func (client *VirtualMachineImagesClient) listByEdgeZoneHandleResponse(resp *htt
// ListOffers - Gets a list of virtual machine image offers for the specified location and publisher.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - publisherName - A valid image publisher.
// - options - VirtualMachineImagesClientListOffersOptions contains the optional parameters for the VirtualMachineImagesClient.ListOffers
@ -324,7 +324,7 @@ func (client *VirtualMachineImagesClient) listOffersCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -342,7 +342,7 @@ func (client *VirtualMachineImagesClient) listOffersHandleResponse(resp *http.Re
// ListPublishers - Gets a list of virtual machine image publishers for the specified Azure location.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - options - VirtualMachineImagesClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesClient.ListPublishers
// method.
@ -384,7 +384,7 @@ func (client *VirtualMachineImagesClient) listPublishersCreateRequest(ctx contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -402,7 +402,7 @@ func (client *VirtualMachineImagesClient) listPublishersHandleResponse(resp *htt
// ListSKUs - Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - publisherName - A valid image publisher.
// - offer - A valid image publisher offer.
@ -454,7 +454,7 @@ func (client *VirtualMachineImagesClient) listSKUsCreateRequest(ctx context.Cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -48,7 +48,7 @@ func NewVirtualMachineImagesEdgeZoneClient(subscriptionID string, credential azc
// Get - Gets a virtual machine image in an edge zone.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - edgeZone - The name of the edge zone.
// - publisherName - A valid image publisher.
@ -115,7 +115,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) getCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -133,7 +133,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) getHandleResponse(resp *http.R
// List - Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - edgeZone - The name of the edge zone.
// - publisherName - A valid image publisher.
@ -198,13 +198,13 @@ func (client *VirtualMachineImagesEdgeZoneClient) listCreateRequest(ctx context.
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
if options != nil && options.Top != nil {
reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
}
if options != nil && options.Orderby != nil {
reqQP.Set("$orderby", *options.Orderby)
}
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.Top != nil {
reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
}
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -222,7 +222,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listHandleResponse(resp *http.
// ListOffers - Gets a list of virtual machine image offers for the specified location, edge zone and publisher.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - edgeZone - The name of the edge zone.
// - publisherName - A valid image publisher.
@ -274,7 +274,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listOffersCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -292,7 +292,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listOffersHandleResponse(resp
// ListPublishers - Gets a list of virtual machine image publishers for the specified Azure location and edge zone.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - edgeZone - The name of the edge zone.
// - options - VirtualMachineImagesEdgeZoneClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListPublishers
@ -339,7 +339,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listPublishersCreateRequest(ct
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -357,7 +357,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listPublishersHandleResponse(r
// ListSKUs - Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The name of a supported Azure region.
// - edgeZone - The name of the edge zone.
// - publisherName - A valid image publisher.
@ -414,7 +414,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listSKUsCreateRequest(ctx cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -47,7 +47,7 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string, credential azcore
// BeginCreateOrUpdate - The operation to create or update the run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine where the run command should be created or updated.
// - runCommandName - The name of the virtual machine run command.
@ -74,7 +74,7 @@ func (client *VirtualMachineRunCommandsClient) BeginCreateOrUpdate(ctx context.C
// CreateOrUpdate - The operation to create or update the run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineRunCommandsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineRunCommandsClient.BeginCreateOrUpdate"
@ -120,7 +120,7 @@ func (client *VirtualMachineRunCommandsClient) createOrUpdateCreateRequest(ctx c
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
@ -132,7 +132,7 @@ func (client *VirtualMachineRunCommandsClient) createOrUpdateCreateRequest(ctx c
// BeginDelete - The operation to delete the run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine where the run command should be deleted.
// - runCommandName - The name of the virtual machine run command.
@ -158,7 +158,7 @@ func (client *VirtualMachineRunCommandsClient) BeginDelete(ctx context.Context,
// Delete - The operation to delete the run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineRunCommandsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, options *VirtualMachineRunCommandsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineRunCommandsClient.BeginDelete"
@ -204,7 +204,7 @@ func (client *VirtualMachineRunCommandsClient) deleteCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
return req, nil
@ -213,7 +213,7 @@ func (client *VirtualMachineRunCommandsClient) deleteCreateRequest(ctx context.C
// Get - Gets specific run command for a subscription in a location.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The location upon which run commands is queried.
// - commandID - The command id.
// - options - VirtualMachineRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineRunCommandsClient.Get
@ -260,7 +260,7 @@ func (client *VirtualMachineRunCommandsClient) getCreateRequest(ctx context.Cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
return req, nil
@ -278,7 +278,7 @@ func (client *VirtualMachineRunCommandsClient) getHandleResponse(resp *http.Resp
// GetByVirtualMachine - The operation to get the run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine containing the run command.
// - runCommandName - The name of the virtual machine run command.
@ -333,7 +333,7 @@ func (client *VirtualMachineRunCommandsClient) getByVirtualMachineCreateRequest(
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
return req, nil
@ -350,7 +350,7 @@ func (client *VirtualMachineRunCommandsClient) getByVirtualMachineHandleResponse
// NewListPager - Lists all available run commands for a subscription in a location.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The location upon which run commands is queried.
// - options - VirtualMachineRunCommandsClientListOptions contains the optional parameters for the VirtualMachineRunCommandsClient.NewListPager
// method.
@ -393,7 +393,7 @@ func (client *VirtualMachineRunCommandsClient) listCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
return req, nil
@ -410,7 +410,7 @@ func (client *VirtualMachineRunCommandsClient) listHandleResponse(resp *http.Res
// NewListByVirtualMachinePager - The operation to get all run commands of a Virtual Machine.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine containing the run command.
// - options - VirtualMachineRunCommandsClientListByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.NewListByVirtualMachinePager
@ -461,7 +461,7 @@ func (client *VirtualMachineRunCommandsClient) listByVirtualMachineCreateRequest
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
return req, nil
@ -479,7 +479,7 @@ func (client *VirtualMachineRunCommandsClient) listByVirtualMachineHandleRespons
// BeginUpdate - The operation to update the run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine where the run command should be updated.
// - runCommandName - The name of the virtual machine run command.
@ -506,7 +506,7 @@ func (client *VirtualMachineRunCommandsClient) BeginUpdate(ctx context.Context,
// Update - The operation to update the run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineRunCommandsClient) update(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineRunCommandsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineRunCommandsClient.BeginUpdate"
@ -552,7 +552,7 @@ func (client *VirtualMachineRunCommandsClient) updateCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
if err := runtime.MarshalAsJSON(req, runCommand); err != nil {

View file

@ -48,7 +48,7 @@ func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCred
// BeginAssessPatches - Assess patches on the VM.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginAssessPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginAssessPatches
@ -74,7 +74,7 @@ func (client *VirtualMachinesClient) BeginAssessPatches(ctx context.Context, res
// AssessPatches - Assess patches on the VM.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) assessPatches(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginAssessPatchesOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginAssessPatches"
@ -116,7 +116,7 @@ func (client *VirtualMachinesClient) assessPatchesCreateRequest(ctx context.Cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -125,7 +125,7 @@ func (client *VirtualMachinesClient) assessPatchesCreateRequest(ctx context.Cont
// BeginAttachDetachDataDisks - Attach and detach data disks to/from the virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - parameters - Parameters supplied to the attach and detach data disks operation on the virtual machine.
@ -152,7 +152,7 @@ func (client *VirtualMachinesClient) BeginAttachDetachDataDisks(ctx context.Cont
// AttachDetachDataDisks - Attach and detach data disks to/from the virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) attachDetachDataDisks(ctx context.Context, resourceGroupName string, vmName string, parameters AttachDetachDataDisksRequest, options *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginAttachDetachDataDisks"
@ -194,7 +194,7 @@ func (client *VirtualMachinesClient) attachDetachDataDisksCreateRequest(ctx cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -207,7 +207,7 @@ func (client *VirtualMachinesClient) attachDetachDataDisksCreateRequest(ctx cont
// similar VMs.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - parameters - Parameters supplied to the Capture Virtual Machine operation.
@ -235,7 +235,7 @@ func (client *VirtualMachinesClient) BeginCapture(ctx context.Context, resourceG
// VMs.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) capture(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineCaptureParameters, options *VirtualMachinesClientBeginCaptureOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginCapture"
@ -277,7 +277,7 @@ func (client *VirtualMachinesClient) captureCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -290,7 +290,7 @@ func (client *VirtualMachinesClient) captureCreateRequest(ctx context.Context, r
// before invoking this operation.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginConvertToManagedDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginConvertToManagedDisks
@ -316,7 +316,7 @@ func (client *VirtualMachinesClient) BeginConvertToManagedDisks(ctx context.Cont
// before invoking this operation.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) convertToManagedDisks(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginConvertToManagedDisksOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginConvertToManagedDisks"
@ -358,7 +358,7 @@ func (client *VirtualMachinesClient) convertToManagedDisksCreateRequest(ctx cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -368,7 +368,7 @@ func (client *VirtualMachinesClient) convertToManagedDisksCreateRequest(ctx cont
// during virtual machine creation.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - parameters - Parameters supplied to the Create Virtual Machine operation.
@ -395,7 +395,7 @@ func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, re
// virtual machine creation.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginCreateOrUpdate"
@ -437,15 +437,15 @@ func (client *VirtualMachinesClient) createOrUpdateCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
}
if options != nil && options.IfNoneMatch != nil {
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
}
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
return nil, err
}
@ -456,7 +456,7 @@ func (client *VirtualMachinesClient) createOrUpdateCreateRequest(ctx context.Con
// resources that this virtual machine uses.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginDeallocateOptions contains the optional parameters for the VirtualMachinesClient.BeginDeallocate
@ -482,7 +482,7 @@ func (client *VirtualMachinesClient) BeginDeallocate(ctx context.Context, resour
// that this virtual machine uses.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) deallocate(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeallocateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginDeallocate"
@ -524,10 +524,10 @@ func (client *VirtualMachinesClient) deallocateCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.Hibernate != nil {
reqQP.Set("hibernate", strconv.FormatBool(*options.Hibernate))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -536,7 +536,7 @@ func (client *VirtualMachinesClient) deallocateCreateRequest(ctx context.Context
// BeginDelete - The operation to delete a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete
@ -561,7 +561,7 @@ func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGr
// Delete - The operation to delete a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginDelete"
@ -603,10 +603,10 @@ func (client *VirtualMachinesClient) deleteCreateRequest(ctx context.Context, re
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.ForceDeletion != nil {
reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -619,7 +619,7 @@ func (client *VirtualMachinesClient) deleteCreateRequest(ctx context.Context, re
// [https://docs.microsoft.com/azure/virtual-machines/linux/capture-image].
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientGeneralizeOptions contains the optional parameters for the VirtualMachinesClient.Generalize
@ -665,7 +665,7 @@ func (client *VirtualMachinesClient) generalizeCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -674,7 +674,7 @@ func (client *VirtualMachinesClient) generalizeCreateRequest(ctx context.Context
// Get - Retrieves information about the model view or the instance view of a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
@ -723,7 +723,7 @@ func (client *VirtualMachinesClient) getCreateRequest(ctx context.Context, resou
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -741,7 +741,7 @@ func (client *VirtualMachinesClient) getHandleResponse(resp *http.Response) (Vir
// BeginInstallPatches - Installs patches on the VM.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - installPatchesInput - Input for InstallPatches as directly received by the API
@ -768,7 +768,7 @@ func (client *VirtualMachinesClient) BeginInstallPatches(ctx context.Context, re
// InstallPatches - Installs patches on the VM.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) installPatches(ctx context.Context, resourceGroupName string, vmName string, installPatchesInput VirtualMachineInstallPatchesParameters, options *VirtualMachinesClientBeginInstallPatchesOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginInstallPatches"
@ -810,7 +810,7 @@ func (client *VirtualMachinesClient) installPatchesCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, installPatchesInput); err != nil {
@ -822,7 +822,7 @@ func (client *VirtualMachinesClient) installPatchesCreateRequest(ctx context.Con
// InstanceView - Retrieves information about the run-time state of a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientInstanceViewOptions contains the optional parameters for the VirtualMachinesClient.InstanceView
@ -869,7 +869,7 @@ func (client *VirtualMachinesClient) instanceViewCreateRequest(ctx context.Conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -887,7 +887,7 @@ func (client *VirtualMachinesClient) instanceViewHandleResponse(resp *http.Respo
// NewListPager - Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response
// to get the next page of virtual machines.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.NewListPager
// method.
@ -930,13 +930,13 @@ func (client *VirtualMachinesClient) listCreateRequest(ctx context.Context, reso
return nil, err
}
reqQP := req.Raw().URL.Query()
if options != nil && options.Filter != nil {
reqQP.Set("$filter", *options.Filter)
}
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.Filter != nil {
reqQP.Set("$filter", *options.Filter)
}
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -954,7 +954,7 @@ func (client *VirtualMachinesClient) listHandleResponse(resp *http.Response) (Vi
// NewListAllPager - Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response
// to get the next page of virtual machines.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - VirtualMachinesClientListAllOptions contains the optional parameters for the VirtualMachinesClient.NewListAllPager
// method.
func (client *VirtualMachinesClient) NewListAllPager(options *VirtualMachinesClientListAllOptions) *runtime.Pager[VirtualMachinesClientListAllResponse] {
@ -992,15 +992,15 @@ func (client *VirtualMachinesClient) listAllCreateRequest(ctx context.Context, o
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.StatusOnly != nil {
reqQP.Set("statusOnly", *options.StatusOnly)
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
if options != nil && options.Filter != nil {
reqQP.Set("$filter", *options.Filter)
}
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.StatusOnly != nil {
reqQP.Set("statusOnly", *options.StatusOnly)
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
@ -1018,7 +1018,7 @@ func (client *VirtualMachinesClient) listAllHandleResponse(resp *http.Response)
// NewListAvailableSizesPager - Lists all available virtual machine sizes to which the specified virtual machine can be resized.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientListAvailableSizesOptions contains the optional parameters for the VirtualMachinesClient.NewListAvailableSizesPager
@ -1067,7 +1067,7 @@ func (client *VirtualMachinesClient) listAvailableSizesCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1084,7 +1084,7 @@ func (client *VirtualMachinesClient) listAvailableSizesHandleResponse(resp *http
// NewListByLocationPager - Gets all the virtual machines under the specified subscription for the specified location.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The location for which virtual machines under the subscription are queried.
// - options - VirtualMachinesClientListByLocationOptions contains the optional parameters for the VirtualMachinesClient.NewListByLocationPager
// method.
@ -1127,7 +1127,7 @@ func (client *VirtualMachinesClient) listByLocationCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1145,7 +1145,7 @@ func (client *VirtualMachinesClient) listByLocationHandleResponse(resp *http.Res
// BeginPerformMaintenance - The operation to perform maintenance on a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachinesClient.BeginPerformMaintenance
@ -1170,7 +1170,7 @@ func (client *VirtualMachinesClient) BeginPerformMaintenance(ctx context.Context
// PerformMaintenance - The operation to perform maintenance on a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) performMaintenance(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPerformMaintenanceOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginPerformMaintenance"
@ -1212,7 +1212,7 @@ func (client *VirtualMachinesClient) performMaintenanceCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1222,7 +1222,7 @@ func (client *VirtualMachinesClient) performMaintenanceCreateRequest(ctx context
// provisioned resources. You are still charged for this virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff
@ -1248,7 +1248,7 @@ func (client *VirtualMachinesClient) BeginPowerOff(ctx context.Context, resource
// resources. You are still charged for this virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) powerOff(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPowerOffOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginPowerOff"
@ -1290,10 +1290,10 @@ func (client *VirtualMachinesClient) powerOffCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.SkipShutdown != nil {
reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1302,7 +1302,7 @@ func (client *VirtualMachinesClient) powerOffCreateRequest(ctx context.Context,
// BeginReapply - The operation to reapply a virtual machine's state.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginReapplyOptions contains the optional parameters for the VirtualMachinesClient.BeginReapply
@ -1327,7 +1327,7 @@ func (client *VirtualMachinesClient) BeginReapply(ctx context.Context, resourceG
// Reapply - The operation to reapply a virtual machine's state.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) reapply(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReapplyOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginReapply"
@ -1369,7 +1369,7 @@ func (client *VirtualMachinesClient) reapplyCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1378,7 +1378,7 @@ func (client *VirtualMachinesClient) reapplyCreateRequest(ctx context.Context, r
// BeginRedeploy - Shuts down the virtual machine, moves it to a new node, and powers it back on.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy
@ -1403,7 +1403,7 @@ func (client *VirtualMachinesClient) BeginRedeploy(ctx context.Context, resource
// Redeploy - Shuts down the virtual machine, moves it to a new node, and powers it back on.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) redeploy(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRedeployOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginRedeploy"
@ -1445,7 +1445,7 @@ func (client *VirtualMachinesClient) redeployCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1458,7 +1458,7 @@ func (client *VirtualMachinesClient) redeployCreateRequest(ctx context.Context,
// will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage
@ -1487,7 +1487,7 @@ func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceG
// will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) reimage(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReimageOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginReimage"
@ -1529,7 +1529,7 @@ func (client *VirtualMachinesClient) reimageCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Parameters != nil {
@ -1544,7 +1544,7 @@ func (client *VirtualMachinesClient) reimageCreateRequest(ctx context.Context, r
// BeginRestart - The operation to restart a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart
@ -1569,7 +1569,7 @@ func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceG
// Restart - The operation to restart a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) restart(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRestartOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginRestart"
@ -1611,7 +1611,7 @@ func (client *VirtualMachinesClient) restartCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1620,7 +1620,7 @@ func (client *VirtualMachinesClient) restartCreateRequest(ctx context.Context, r
// RetrieveBootDiagnosticsData - The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachinesClient.RetrieveBootDiagnosticsData
@ -1667,10 +1667,10 @@ func (client *VirtualMachinesClient) retrieveBootDiagnosticsDataCreateRequest(ct
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.SasURIExpirationTimeInMinutes != nil {
reqQP.Set("sasUriExpirationTimeInMinutes", strconv.FormatInt(int64(*options.SasURIExpirationTimeInMinutes), 10))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1688,7 +1688,7 @@ func (client *VirtualMachinesClient) retrieveBootDiagnosticsDataHandleResponse(r
// BeginRunCommand - Run command on the VM.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - parameters - Parameters supplied to the Run command operation.
@ -1715,7 +1715,7 @@ func (client *VirtualMachinesClient) BeginRunCommand(ctx context.Context, resour
// RunCommand - Run command on the VM.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) runCommand(ctx context.Context, resourceGroupName string, vmName string, parameters RunCommandInput, options *VirtualMachinesClientBeginRunCommandOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginRunCommand"
@ -1757,7 +1757,7 @@ func (client *VirtualMachinesClient) runCommandCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -1769,7 +1769,7 @@ func (client *VirtualMachinesClient) runCommandCreateRequest(ctx context.Context
// SimulateEviction - The operation to simulate the eviction of spot virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientSimulateEvictionOptions contains the optional parameters for the VirtualMachinesClient.SimulateEviction
@ -1815,7 +1815,7 @@ func (client *VirtualMachinesClient) simulateEvictionCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1824,7 +1824,7 @@ func (client *VirtualMachinesClient) simulateEvictionCreateRequest(ctx context.C
// BeginStart - The operation to start a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart
@ -1849,7 +1849,7 @@ func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGro
// Start - The operation to start a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) start(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginStartOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginStart"
@ -1891,7 +1891,7 @@ func (client *VirtualMachinesClient) startCreateRequest(ctx context.Context, res
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1900,7 +1900,7 @@ func (client *VirtualMachinesClient) startCreateRequest(ctx context.Context, res
// BeginUpdate - The operation to update a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmName - The name of the virtual machine.
// - parameters - Parameters supplied to the Update Virtual Machine operation.
@ -1926,7 +1926,7 @@ func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGr
// Update - The operation to update a virtual machine.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachinesClient) update(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineUpdate, options *VirtualMachinesClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachinesClient.BeginUpdate"
@ -1968,15 +1968,15 @@ func (client *VirtualMachinesClient) updateCreateRequest(ctx context.Context, re
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
}
if options != nil && options.IfNoneMatch != nil {
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
}
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
return nil, err
}

View file

@ -47,7 +47,7 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string, credential
// BeginCreateOrUpdate - The operation to create or update an extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set where the extension should be create or updated.
// - vmssExtensionName - The name of the VM scale set extension.
@ -74,7 +74,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginCreateOrUpdate(ctx co
// CreateOrUpdate - The operation to create or update an extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension, options *VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetExtensionsClient.BeginCreateOrUpdate"
@ -120,7 +120,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) createOrUpdateCreateReques
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
@ -132,7 +132,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) createOrUpdateCreateReques
// BeginDelete - The operation to delete the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set where the extension should be deleted.
// - vmssExtensionName - The name of the VM scale set extension.
@ -158,7 +158,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginDelete(ctx context.Co
// Delete - The operation to delete the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, options *VirtualMachineScaleSetExtensionsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetExtensionsClient.BeginDelete"
@ -204,7 +204,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) deleteCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -213,7 +213,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) deleteCreateRequest(ctx co
// Get - The operation to get the extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set containing the extension.
// - vmssExtensionName - The name of the VM scale set extension.
@ -268,7 +268,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) getCreateRequest(ctx conte
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -285,7 +285,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) getHandleResponse(resp *ht
// NewListPager - Gets a list of all extensions in a VM scale set.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set containing the extension.
// - options - VirtualMachineScaleSetExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.NewListPager
@ -333,7 +333,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) listCreateRequest(ctx cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -351,7 +351,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) listHandleResponse(resp *h
// BeginUpdate - The operation to update an extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set where the extension should be updated.
// - vmssExtensionName - The name of the VM scale set extension.
@ -378,7 +378,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginUpdate(ctx context.Co
// Update - The operation to update an extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetExtensionsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate, options *VirtualMachineScaleSetExtensionsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetExtensionsClient.BeginUpdate"
@ -424,7 +424,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) updateCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {

View file

@ -47,7 +47,7 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string, crede
// BeginCancel - Cancels the current virtual machine scale set rolling upgrade.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginCancel
@ -72,7 +72,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginCancel(ctx conte
// Cancel - Cancels the current virtual machine scale set rolling upgrade.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetRollingUpgradesClient) cancel(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginCancel"
@ -114,7 +114,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) cancelCreateRequest(c
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -123,7 +123,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) cancelCreateRequest(c
// GetLatest - Gets the status of the latest virtual machine scale set rolling upgrade.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.GetLatest
@ -170,7 +170,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) getLatestCreateReques
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -190,7 +190,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) getLatestHandleRespon
// are not affected.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions contains the optional parameters
@ -217,7 +217,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginStartExtensionUp
// are not affected.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetRollingUpgradesClient) startExtensionUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginStartExtensionUpgrade"
@ -259,7 +259,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) startExtensionUpgrade
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -270,7 +270,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) startExtensionUpgrade
// affected.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions contains the optional parameters for the
@ -297,7 +297,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginStartOSUpgrade(c
// affected.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetRollingUpgradesClient) startOSUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginStartOSUpgrade"
@ -339,7 +339,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) startOSUpgradeCreateR
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -49,7 +49,7 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string, credential azcore.T
// scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade
@ -75,7 +75,7 @@ func (client *VirtualMachineScaleSetsClient) BeginApproveRollingUpgrade(ctx cont
// set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) approveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade"
@ -117,7 +117,7 @@ func (client *VirtualMachineScaleSetsClient) approveRollingUpgradeCreateRequest(
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMInstanceIDs != nil {
@ -132,7 +132,7 @@ func (client *VirtualMachineScaleSetsClient) approveRollingUpgradeCreateRequest(
// ConvertToSinglePlacementGroup - Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the virtual machine scale set to create or update.
// - parameters - The input object for ConvertToSinglePlacementGroup API.
@ -179,7 +179,7 @@ func (client *VirtualMachineScaleSetsClient) convertToSinglePlacementGroupCreate
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -191,7 +191,7 @@ func (client *VirtualMachineScaleSetsClient) convertToSinglePlacementGroupCreate
// BeginCreateOrUpdate - Create or update a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set to create or update.
// - parameters - The scale set object.
@ -217,7 +217,7 @@ func (client *VirtualMachineScaleSetsClient) BeginCreateOrUpdate(ctx context.Con
// CreateOrUpdate - Create or update a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSet, options *VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginCreateOrUpdate"
@ -259,15 +259,15 @@ func (client *VirtualMachineScaleSetsClient) createOrUpdateCreateRequest(ctx con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
}
if options != nil && options.IfNoneMatch != nil {
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
}
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
return nil, err
}
@ -279,7 +279,7 @@ func (client *VirtualMachineScaleSetsClient) createOrUpdateCreateRequest(ctx con
// scale set deallocates.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeallocate
@ -306,7 +306,7 @@ func (client *VirtualMachineScaleSetsClient) BeginDeallocate(ctx context.Context
// scale set deallocates.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) deallocate(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeallocateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginDeallocate"
@ -348,10 +348,10 @@ func (client *VirtualMachineScaleSetsClient) deallocateCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.Hibernate != nil {
reqQP.Set("hibernate", strconv.FormatBool(*options.Hibernate))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMInstanceIDs != nil {
@ -366,7 +366,7 @@ func (client *VirtualMachineScaleSetsClient) deallocateCreateRequest(ctx context
// BeginDelete - Deletes a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDelete
@ -391,7 +391,7 @@ func (client *VirtualMachineScaleSetsClient) BeginDelete(ctx context.Context, re
// Delete - Deletes a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginDelete"
@ -433,10 +433,10 @@ func (client *VirtualMachineScaleSetsClient) deleteCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.ForceDeletion != nil {
reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -445,7 +445,7 @@ func (client *VirtualMachineScaleSetsClient) deleteCreateRequest(ctx context.Con
// BeginDeleteInstances - Deletes virtual machines in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - vmInstanceIDs - A list of virtual machine instance IDs from the VM scale set.
@ -471,7 +471,7 @@ func (client *VirtualMachineScaleSetsClient) BeginDeleteInstances(ctx context.Co
// DeleteInstances - Deletes virtual machines in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) deleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginDeleteInstancesOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginDeleteInstances"
@ -513,10 +513,10 @@ func (client *VirtualMachineScaleSetsClient) deleteInstancesCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.ForceDeletion != nil {
reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, vmInstanceIDs); err != nil {
@ -529,7 +529,7 @@ func (client *VirtualMachineScaleSetsClient) deleteInstancesCreateRequest(ctx co
// service fabric virtual machine scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - platformUpdateDomain - The platform update domain for which a manual recovery walk is requested
@ -577,14 +577,14 @@ func (client *VirtualMachineScaleSetsClient) forceRecoveryServiceFabricPlatformU
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.PlacementGroupID != nil {
reqQP.Set("placementGroupId", *options.PlacementGroupID)
}
reqQP.Set("platformUpdateDomain", strconv.FormatInt(int64(platformUpdateDomain), 10))
if options != nil && options.Zone != nil {
reqQP.Set("zone", *options.Zone)
}
if options != nil && options.PlacementGroupID != nil {
reqQP.Set("placementGroupId", *options.PlacementGroupID)
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -602,7 +602,7 @@ func (client *VirtualMachineScaleSetsClient) forceRecoveryServiceFabricPlatformU
// Get - Display information about a virtual machine scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetsClient.Get
@ -649,10 +649,10 @@ func (client *VirtualMachineScaleSetsClient) getCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -670,7 +670,7 @@ func (client *VirtualMachineScaleSetsClient) getHandleResponse(resp *http.Respon
// GetInstanceView - Gets the status of a VM scale set instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetsClient.GetInstanceView
@ -717,7 +717,7 @@ func (client *VirtualMachineScaleSetsClient) getInstanceViewCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -734,7 +734,7 @@ func (client *VirtualMachineScaleSetsClient) getInstanceViewHandleResponse(resp
// NewGetOSUpgradeHistoryPager - Gets list of OS upgrades on a VM scale set instance.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewGetOSUpgradeHistoryPager
@ -782,7 +782,7 @@ func (client *VirtualMachineScaleSetsClient) getOSUpgradeHistoryCreateRequest(ct
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -799,7 +799,7 @@ func (client *VirtualMachineScaleSetsClient) getOSUpgradeHistoryHandleResponse(r
// NewListPager - Gets a list of all VM scale sets under a resource group.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - options - VirtualMachineScaleSetsClientListOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListPager
// method.
@ -842,7 +842,7 @@ func (client *VirtualMachineScaleSetsClient) listCreateRequest(ctx context.Conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -861,7 +861,7 @@ func (client *VirtualMachineScaleSetsClient) listHandleResponse(resp *http.Respo
// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is
// null to fetch all the VM Scale Sets.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - options - VirtualMachineScaleSetsClientListAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListAllPager
// method.
func (client *VirtualMachineScaleSetsClient) NewListAllPager(options *VirtualMachineScaleSetsClientListAllOptions) *runtime.Pager[VirtualMachineScaleSetsClientListAllResponse] {
@ -899,7 +899,7 @@ func (client *VirtualMachineScaleSetsClient) listAllCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -916,7 +916,7 @@ func (client *VirtualMachineScaleSetsClient) listAllHandleResponse(resp *http.Re
// NewListByLocationPager - Gets all the VM scale sets under the specified subscription for the specified location.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The location for which VM scale sets under the subscription are queried.
// - options - VirtualMachineScaleSetsClientListByLocationOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListByLocationPager
// method.
@ -959,7 +959,7 @@ func (client *VirtualMachineScaleSetsClient) listByLocationCreateRequest(ctx con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -977,7 +977,7 @@ func (client *VirtualMachineScaleSetsClient) listByLocationHandleResponse(resp *
// NewListSKUsPager - Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances
// allowed for each SKU.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientListSKUsOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListSKUsPager
@ -1025,7 +1025,7 @@ func (client *VirtualMachineScaleSetsClient) listSKUsCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1045,7 +1045,7 @@ func (client *VirtualMachineScaleSetsClient) listSKUsHandleResponse(resp *http.R
// details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPerformMaintenance
@ -1072,7 +1072,7 @@ func (client *VirtualMachineScaleSetsClient) BeginPerformMaintenance(ctx context
// details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) performMaintenance(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginPerformMaintenance"
@ -1114,7 +1114,7 @@ func (client *VirtualMachineScaleSetsClient) performMaintenanceCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMInstanceIDs != nil {
@ -1131,7 +1131,7 @@ func (client *VirtualMachineScaleSetsClient) performMaintenanceCreateRequest(ctx
// avoid charges.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPowerOff
@ -1158,7 +1158,7 @@ func (client *VirtualMachineScaleSetsClient) BeginPowerOff(ctx context.Context,
// avoid charges.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) powerOff(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPowerOffOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginPowerOff"
@ -1200,10 +1200,10 @@ func (client *VirtualMachineScaleSetsClient) powerOffCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.SkipShutdown != nil {
reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMInstanceIDs != nil {
@ -1218,7 +1218,7 @@ func (client *VirtualMachineScaleSetsClient) powerOffCreateRequest(ctx context.C
// BeginReapply - Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginReapplyOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReapply
@ -1244,7 +1244,7 @@ func (client *VirtualMachineScaleSetsClient) BeginReapply(ctx context.Context, r
// Reapply - Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) reapply(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReapplyOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginReapply"
@ -1286,7 +1286,7 @@ func (client *VirtualMachineScaleSetsClient) reapplyCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1296,7 +1296,7 @@ func (client *VirtualMachineScaleSetsClient) reapplyCreateRequest(ctx context.Co
// them back on.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRedeploy
@ -1322,7 +1322,7 @@ func (client *VirtualMachineScaleSetsClient) BeginRedeploy(ctx context.Context,
// back on.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) redeploy(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRedeployOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginRedeploy"
@ -1364,7 +1364,7 @@ func (client *VirtualMachineScaleSetsClient) redeployCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMInstanceIDs != nil {
@ -1381,7 +1381,7 @@ func (client *VirtualMachineScaleSetsClient) redeployCreateRequest(ctx context.C
// reset to initial state.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimage
@ -1408,7 +1408,7 @@ func (client *VirtualMachineScaleSetsClient) BeginReimage(ctx context.Context, r
// reset to initial state.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) reimage(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginReimage"
@ -1450,7 +1450,7 @@ func (client *VirtualMachineScaleSetsClient) reimageCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMScaleSetReimageInput != nil {
@ -1466,7 +1466,7 @@ func (client *VirtualMachineScaleSetsClient) reimageCreateRequest(ctx context.Co
// is only supported for managed disks.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimageAll
@ -1492,7 +1492,7 @@ func (client *VirtualMachineScaleSetsClient) BeginReimageAll(ctx context.Context
// is only supported for managed disks.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) reimageAll(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageAllOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginReimageAll"
@ -1534,7 +1534,7 @@ func (client *VirtualMachineScaleSetsClient) reimageAllCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMInstanceIDs != nil {
@ -1549,7 +1549,7 @@ func (client *VirtualMachineScaleSetsClient) reimageAllCreateRequest(ctx context
// BeginRestart - Restarts one or more virtual machines in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRestart
@ -1574,7 +1574,7 @@ func (client *VirtualMachineScaleSetsClient) BeginRestart(ctx context.Context, r
// Restart - Restarts one or more virtual machines in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) restart(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRestartOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginRestart"
@ -1616,7 +1616,7 @@ func (client *VirtualMachineScaleSetsClient) restartCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMInstanceIDs != nil {
@ -1631,7 +1631,7 @@ func (client *VirtualMachineScaleSetsClient) restartCreateRequest(ctx context.Co
// BeginSetOrchestrationServiceState - Changes ServiceState property for a given service
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the virtual machine scale set to create or update.
// - parameters - The input object for SetOrchestrationServiceState API.
@ -1657,7 +1657,7 @@ func (client *VirtualMachineScaleSetsClient) BeginSetOrchestrationServiceState(c
// SetOrchestrationServiceState - Changes ServiceState property for a given service
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) setOrchestrationServiceState(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters OrchestrationServiceStateInput, options *VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginSetOrchestrationServiceState"
@ -1699,7 +1699,7 @@ func (client *VirtualMachineScaleSetsClient) setOrchestrationServiceStateCreateR
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -1711,7 +1711,7 @@ func (client *VirtualMachineScaleSetsClient) setOrchestrationServiceStateCreateR
// BeginStart - Starts one or more virtual machines in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginStart
@ -1736,7 +1736,7 @@ func (client *VirtualMachineScaleSetsClient) BeginStart(ctx context.Context, res
// Start - Starts one or more virtual machines in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) start(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginStartOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginStart"
@ -1778,7 +1778,7 @@ func (client *VirtualMachineScaleSetsClient) startCreateRequest(ctx context.Cont
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMInstanceIDs != nil {
@ -1793,7 +1793,7 @@ func (client *VirtualMachineScaleSetsClient) startCreateRequest(ctx context.Cont
// BeginUpdate - Update a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set to create or update.
// - parameters - The scale set object.
@ -1819,7 +1819,7 @@ func (client *VirtualMachineScaleSetsClient) BeginUpdate(ctx context.Context, re
// Update - Update a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSetUpdate, options *VirtualMachineScaleSetsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginUpdate"
@ -1861,15 +1861,15 @@ func (client *VirtualMachineScaleSetsClient) updateCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
}
if options != nil && options.IfNoneMatch != nil {
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
}
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
return nil, err
}
@ -1879,7 +1879,7 @@ func (client *VirtualMachineScaleSetsClient) updateCreateRequest(ctx context.Con
// BeginUpdateInstances - Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - vmInstanceIDs - A list of virtual machine instance IDs from the VM scale set.
@ -1905,7 +1905,7 @@ func (client *VirtualMachineScaleSetsClient) BeginUpdateInstances(ctx context.Co
// UpdateInstances - Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetsClient) updateInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginUpdateInstancesOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetsClient.BeginUpdateInstances"
@ -1947,7 +1947,7 @@ func (client *VirtualMachineScaleSetsClient) updateInstancesCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, vmInstanceIDs); err != nil {

View file

@ -47,7 +47,7 @@ func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string, credenti
// BeginCreateOrUpdate - The operation to create or update the VMSS VM extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -75,7 +75,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginCreateOrUpdate(ctx
// CreateOrUpdate - The operation to create or update the VMSS VM extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension, options *VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginCreateOrUpdate"
@ -125,7 +125,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) createOrUpdateCreateRequ
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
@ -137,7 +137,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) createOrUpdateCreateRequ
// BeginDelete - The operation to delete the VMSS VM extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -164,7 +164,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginDelete(ctx context.
// Delete - The operation to delete the VMSS VM extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, options *VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginDelete"
@ -214,7 +214,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) deleteCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -223,7 +223,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) deleteCreateRequest(ctx
// Get - The operation to get the VMSS VM extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -283,7 +283,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) getCreateRequest(ctx con
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -301,7 +301,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) getHandleResponse(resp *
// List - The operation to get all extensions of an instance in Virtual Machine Scaleset.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -356,7 +356,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) listCreateRequest(ctx co
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -374,7 +374,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) listHandleResponse(resp
// BeginUpdate - The operation to update the VMSS VM extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -402,7 +402,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginUpdate(ctx context.
// Update - The operation to update the VMSS VM extension.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMExtensionsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate, options *VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginUpdate"
@ -452,7 +452,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) updateCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {

View file

@ -47,7 +47,7 @@ func NewVirtualMachineScaleSetVMRunCommandsClient(subscriptionID string, credent
// BeginCreateOrUpdate - The operation to create or update the VMSS VM run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -75,7 +75,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginCreateOrUpdate(ctx
// CreateOrUpdate - The operation to create or update the VMSS VM run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMRunCommandsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginCreateOrUpdate"
@ -125,7 +125,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) createOrUpdateCreateReq
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
@ -137,7 +137,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) createOrUpdateCreateReq
// BeginDelete - The operation to delete the VMSS VM run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -164,7 +164,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginDelete(ctx context
// Delete - The operation to delete the VMSS VM run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMRunCommandsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, options *VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginDelete"
@ -214,7 +214,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) deleteCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
return req, nil
@ -223,7 +223,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) deleteCreateRequest(ctx
// Get - The operation to get the VMSS VM run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -283,7 +283,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) getCreateRequest(ctx co
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
return req, nil
@ -300,7 +300,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) getHandleResponse(resp
// NewListPager - The operation to get all run commands of an instance in Virtual Machine Scaleset.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -356,7 +356,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) listCreateRequest(ctx c
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
return req, nil
@ -374,7 +374,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) listHandleResponse(resp
// BeginUpdate - The operation to update the VMSS VM run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -402,7 +402,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginUpdate(ctx context
// Update - The operation to update the VMSS VM run command.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMRunCommandsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginUpdate"
@ -452,7 +452,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) updateCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
if err := runtime.MarshalAsJSON(req, runCommand); err != nil {

View file

@ -48,7 +48,7 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string, credential azcore
// BeginApproveRollingUpgrade - Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -74,7 +74,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginApproveRollingUpgrade(ctx co
// ApproveRollingUpgrade - Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) approveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade"
@ -120,7 +120,7 @@ func (client *VirtualMachineScaleSetVMsClient) approveRollingUpgradeCreateReques
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -129,7 +129,7 @@ func (client *VirtualMachineScaleSetVMsClient) approveRollingUpgradeCreateReques
// BeginAttachDetachDataDisks - Attach and detach data disks to/from a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -157,7 +157,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginAttachDetachDataDisks(ctx co
// AttachDetachDataDisks - Attach and detach data disks to/from a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) attachDetachDataDisks(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters AttachDetachDataDisksRequest, options *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks"
@ -203,7 +203,7 @@ func (client *VirtualMachineScaleSetVMsClient) attachDetachDataDisksCreateReques
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -217,7 +217,7 @@ func (client *VirtualMachineScaleSetVMsClient) attachDetachDataDisksCreateReques
// machine once it is deallocated.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -245,7 +245,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginDeallocate(ctx context.Conte
// machine once it is deallocated.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) deallocate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeallocateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginDeallocate"
@ -291,7 +291,7 @@ func (client *VirtualMachineScaleSetVMsClient) deallocateCreateRequest(ctx conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -300,7 +300,7 @@ func (client *VirtualMachineScaleSetVMsClient) deallocateCreateRequest(ctx conte
// BeginDelete - Deletes a virtual machine from a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -326,7 +326,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginDelete(ctx context.Context,
// Delete - Deletes a virtual machine from a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginDelete"
@ -372,10 +372,10 @@ func (client *VirtualMachineScaleSetVMsClient) deleteCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.ForceDeletion != nil {
reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -384,7 +384,7 @@ func (client *VirtualMachineScaleSetVMsClient) deleteCreateRequest(ctx context.C
// Get - Gets a virtual machine from a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -439,7 +439,7 @@ func (client *VirtualMachineScaleSetVMsClient) getCreateRequest(ctx context.Cont
if options != nil && options.Expand != nil {
reqQP.Set("$expand", string(*options.Expand))
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -457,7 +457,7 @@ func (client *VirtualMachineScaleSetVMsClient) getHandleResponse(resp *http.Resp
// GetInstanceView - Gets the status of a virtual machine from a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -509,7 +509,7 @@ func (client *VirtualMachineScaleSetVMsClient) getInstanceViewCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -526,7 +526,7 @@ func (client *VirtualMachineScaleSetVMsClient) getInstanceViewHandleResponse(res
// NewListPager - Gets a list of all virtual machines in a VM scale sets.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - virtualMachineScaleSetName - The name of the VM scale set.
// - options - VirtualMachineScaleSetVMsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.NewListPager
@ -574,16 +574,16 @@ func (client *VirtualMachineScaleSetVMsClient) listCreateRequest(ctx context.Con
return nil, err
}
reqQP := req.Raw().URL.Query()
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
if options != nil && options.Filter != nil {
reqQP.Set("$filter", *options.Filter)
}
if options != nil && options.Select != nil {
reqQP.Set("$select", *options.Select)
}
if options != nil && options.Expand != nil {
reqQP.Set("$expand", *options.Expand)
}
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -601,7 +601,7 @@ func (client *VirtualMachineScaleSetVMsClient) listHandleResponse(resp *http.Res
// BeginPerformMaintenance - Performs maintenance on a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -627,7 +627,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginPerformMaintenance(ctx conte
// PerformMaintenance - Performs maintenance on a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) performMaintenance(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginPerformMaintenance"
@ -673,7 +673,7 @@ func (client *VirtualMachineScaleSetVMsClient) performMaintenanceCreateRequest(c
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -684,7 +684,7 @@ func (client *VirtualMachineScaleSetVMsClient) performMaintenanceCreateRequest(c
// charges.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -712,7 +712,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginPowerOff(ctx context.Context
// charges.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) powerOff(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPowerOffOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginPowerOff"
@ -758,10 +758,10 @@ func (client *VirtualMachineScaleSetVMsClient) powerOffCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.SkipShutdown != nil {
reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -771,7 +771,7 @@ func (client *VirtualMachineScaleSetVMsClient) powerOffCreateRequest(ctx context
// back on.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -798,7 +798,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRedeploy(ctx context.Context
// on.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) redeploy(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRedeployOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginRedeploy"
@ -844,7 +844,7 @@ func (client *VirtualMachineScaleSetVMsClient) redeployCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -853,7 +853,7 @@ func (client *VirtualMachineScaleSetVMsClient) redeployCreateRequest(ctx context
// BeginReimage - Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -879,7 +879,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginReimage(ctx context.Context,
// Reimage - Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) reimage(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginReimage"
@ -925,7 +925,7 @@ func (client *VirtualMachineScaleSetVMsClient) reimageCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.VMScaleSetVMReimageInput != nil {
@ -941,7 +941,7 @@ func (client *VirtualMachineScaleSetVMsClient) reimageCreateRequest(ctx context.
// is only supported for managed disks.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -968,7 +968,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginReimageAll(ctx context.Conte
// is only supported for managed disks.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) reimageAll(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageAllOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginReimageAll"
@ -1014,7 +1014,7 @@ func (client *VirtualMachineScaleSetVMsClient) reimageAllCreateRequest(ctx conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1023,7 +1023,7 @@ func (client *VirtualMachineScaleSetVMsClient) reimageAllCreateRequest(ctx conte
// BeginRestart - Restarts a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -1049,7 +1049,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRestart(ctx context.Context,
// Restart - Restarts a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) restart(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRestartOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginRestart"
@ -1095,7 +1095,7 @@ func (client *VirtualMachineScaleSetVMsClient) restartCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1105,7 +1105,7 @@ func (client *VirtualMachineScaleSetVMsClient) restartCreateRequest(ctx context.
// scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -1157,10 +1157,10 @@ func (client *VirtualMachineScaleSetVMsClient) retrieveBootDiagnosticsDataCreate
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-03-01")
if options != nil && options.SasURIExpirationTimeInMinutes != nil {
reqQP.Set("sasUriExpirationTimeInMinutes", strconv.FormatInt(int64(*options.SasURIExpirationTimeInMinutes), 10))
}
reqQP.Set("api-version", "2023-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1178,7 +1178,7 @@ func (client *VirtualMachineScaleSetVMsClient) retrieveBootDiagnosticsDataHandle
// BeginRunCommand - Run command on a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -1206,7 +1206,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRunCommand(ctx context.Conte
// RunCommand - Run command on a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) runCommand(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters RunCommandInput, options *VirtualMachineScaleSetVMsClientBeginRunCommandOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginRunCommand"
@ -1252,7 +1252,7 @@ func (client *VirtualMachineScaleSetVMsClient) runCommandCreateRequest(ctx conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
@ -1264,7 +1264,7 @@ func (client *VirtualMachineScaleSetVMsClient) runCommandCreateRequest(ctx conte
// SimulateEviction - The operation to simulate the eviction of spot virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -1315,7 +1315,7 @@ func (client *VirtualMachineScaleSetVMsClient) simulateEvictionCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1324,7 +1324,7 @@ func (client *VirtualMachineScaleSetVMsClient) simulateEvictionCreateRequest(ctx
// BeginStart - Starts a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set.
// - instanceID - The instance ID of the virtual machine.
@ -1350,7 +1350,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginStart(ctx context.Context, r
// Start - Starts a virtual machine in a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) start(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginStartOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginStart"
@ -1396,7 +1396,7 @@ func (client *VirtualMachineScaleSetVMsClient) startCreateRequest(ctx context.Co
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -1405,7 +1405,7 @@ func (client *VirtualMachineScaleSetVMsClient) startCreateRequest(ctx context.Co
// BeginUpdate - Updates a virtual machine of a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - resourceGroupName - The name of the resource group.
// - vmScaleSetName - The name of the VM scale set where the extension should be create or updated.
// - instanceID - The instance ID of the virtual machine.
@ -1432,7 +1432,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginUpdate(ctx context.Context,
// Update - Updates a virtual machine of a VM scale set.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
func (client *VirtualMachineScaleSetVMsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM, options *VirtualMachineScaleSetVMsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "VirtualMachineScaleSetVMsClient.BeginUpdate"
@ -1478,15 +1478,15 @@ func (client *VirtualMachineScaleSetVMsClient) updateCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
}
if options != nil && options.IfNoneMatch != nil {
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
}
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
return nil, err
}

View file

@ -46,7 +46,7 @@ func NewVirtualMachineSizesClient(subscriptionID string, credential azcore.Token
// NewListPager - This API is deprecated. Use Resources Skus [https://docs.microsoft.com/rest/api/compute/resourceskus/list]
//
// Generated from API version 2023-09-01
// Generated from API version 2024-03-01
// - location - The location upon which virtual-machine-sizes is queried.
// - options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.NewListPager
// method.
@ -90,7 +90,7 @@ func (client *VirtualMachineSizesClient) listCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2023-09-01")
reqQP.Set("api-version", "2024-03-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

View file

@ -48,8 +48,8 @@ duplication.
.Net People, Take note on X509:
This uses x509.Certificates and private keys. x509 does not store private keys. .Net
has some x509.Certificate2 thing that has private keys, but that is just some bullcrap that .Net
added, it doesn't exist in real life. As such I've put a PEM decoder into here.
has a x509.Certificate2 abstraction that has private keys, but that just a strange invention.
As such I've put a PEM decoder into here.
*/
// TODO(msal): This should have example code for each method on client using Go's example doc framework.

View file

@ -217,11 +217,13 @@ func WithClaims(claims string) interface {
func WithAuthenticationScheme(authnScheme AuthenticationScheme) interface {
AcquireSilentOption
AcquireInteractiveOption
AcquireByUsernamePasswordOption
options.CallOption
} {
return struct {
AcquireSilentOption
AcquireInteractiveOption
AcquireByUsernamePasswordOption
options.CallOption
}{
CallOption: options.NewCallOption(
@ -231,6 +233,8 @@ func WithAuthenticationScheme(authnScheme AuthenticationScheme) interface {
t.authnScheme = authnScheme
case *interactiveAuthOptions:
t.authnScheme = authnScheme
case *acquireTokenByUsernamePasswordOptions:
t.authnScheme = authnScheme
default:
return fmt.Errorf("unexpected options type %T", a)
}
@ -349,6 +353,7 @@ func (pca Client) AcquireTokenSilent(ctx context.Context, scopes []string, opts
// acquireTokenByUsernamePasswordOptions contains optional configuration for AcquireTokenByUsernamePassword
type acquireTokenByUsernamePasswordOptions struct {
claims, tenantID string
authnScheme AuthenticationScheme
}
// AcquireByUsernamePasswordOption is implemented by options for AcquireTokenByUsernamePassword
@ -374,6 +379,9 @@ func (pca Client) AcquireTokenByUsernamePassword(ctx context.Context, scopes []s
authParams.Claims = o.claims
authParams.Username = username
authParams.Password = password
if o.authnScheme != nil {
authParams.AuthnScheme = o.authnScheme
}
token, err := pca.base.Token.UsernamePassword(ctx, authParams)
if err != nil {

View file

@ -4798,6 +4798,9 @@ var awsPartition = partition{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
@ -4812,6 +4815,14 @@ var awsPartition = partition{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "bedrock-ap-south-1",
}: endpoint{
Hostname: "bedrock.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "bedrock-ap-southeast-1",
}: endpoint{
@ -4836,6 +4847,14 @@ var awsPartition = partition{
Region: "eu-central-1",
},
},
endpointKey{
Region: "bedrock-eu-west-1",
}: endpoint{
Hostname: "bedrock.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "bedrock-eu-west-3",
}: endpoint{
@ -4868,6 +4887,14 @@ var awsPartition = partition{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "bedrock-runtime-ap-south-1",
}: endpoint{
Hostname: "bedrock-runtime.ap-south-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-south-1",
},
},
endpointKey{
Region: "bedrock-runtime-ap-southeast-1",
}: endpoint{
@ -4892,6 +4919,14 @@ var awsPartition = partition{
Region: "eu-central-1",
},
},
endpointKey{
Region: "bedrock-runtime-eu-west-1",
}: endpoint{
Hostname: "bedrock-runtime.eu-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "eu-west-1",
},
},
endpointKey{
Region: "bedrock-runtime-eu-west-3",
}: endpoint{
@ -4951,6 +4986,9 @@ var awsPartition = partition{
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
@ -26008,6 +26046,9 @@ var awsPartition = partition{
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
@ -26017,18 +26058,27 @@ var awsPartition = partition{
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ap-southeast-4",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-2",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-1",
}: endpoint{},
endpointKey{
Region: "eu-south-2",
}: endpoint{},
endpointKey{
Region: "eu-west-1",
}: endpoint{},
@ -26038,6 +26088,9 @@ var awsPartition = partition{
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "me-central-1",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
@ -34537,6 +34590,23 @@ var awsPartition = partition{
Region: "ca-central-1",
},
},
endpointKey{
Region: "ca-west-1",
}: endpoint{
Hostname: "wafv2.ca-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-west-1",
},
},
endpointKey{
Region: "ca-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "wafv2-fips.ca-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-west-1",
},
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
@ -34781,6 +34851,15 @@ var awsPartition = partition{
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-ca-west-1",
}: endpoint{
Hostname: "wafv2-fips.ca-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-eu-central-1",
}: endpoint{
@ -36382,6 +36461,19 @@ var awscnPartition = partition{
}: endpoint{},
},
},
"entitlement.marketplace": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "entitlement-marketplace.cn-northwest-1.amazonaws.com.cn",
Protocols: []string{"https"},
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
},
},
},
"es": service{
Endpoints: serviceEndpoints{
endpointKey{
@ -36819,7 +36911,7 @@ var awscnPartition = partition{
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn",
Hostname: "mediaconvert.cn-northwest-1.amazonaws.com.cn",
CredentialScope: credentialScope{
Region: "cn-northwest-1",
},
@ -40211,6 +40303,15 @@ var awsusgovPartition = partition{
},
"email": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Hostname: "email-fips.us-gov-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-gov-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
@ -40220,6 +40321,15 @@ var awsusgovPartition = partition{
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "email-fips.us-gov-east-1.amazonaws.com",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
@ -41649,6 +41759,16 @@ var awsusgovPartition = partition{
}: endpoint{},
},
},
"license-manager-user-subscriptions": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
},
},
"logs": service{
Endpoints: serviceEndpoints{
endpointKey{

View file

@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
const SDKVersion = "1.51.25"
const SDKVersion = "1.52.0"

View file

@ -5323,10 +5323,10 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ
// that you specify 2. Broadcast and multicast are not supported. For more
// information about NetBIOS node types, see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt).
//
// - ipv6-preferred-lease-time - A value (in seconds, minutes, hours, or
// years) for how frequently a running instance with an IPv6 assigned to
// it goes through DHCPv6 lease renewal. Acceptable values are between 140
// and 2147483647 seconds (approximately 68 years). If no value is entered,
// - ipv6-address-preferred-lease-time - A value (in seconds, minutes, hours,
// or years) for how frequently a running instance with an IPv6 assigned
// to it goes through DHCPv6 lease renewal. Acceptable values are between
// 140 and 2147483647 seconds (approximately 68 years). If no value is entered,
// the default lease time is 140 seconds. If you use long-term addressing
// for EC2 instances, you can increase the lease time and avoid frequent
// lease renewal requests. Lease renewal typically occurs when half of the
@ -6553,10 +6553,10 @@ func (c *EC2) CreateLaunchTemplateRequest(input *CreateLaunchTemplateInput) (req
// see Launch an instance from a launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// If you want to clone an existing launch template as the basis for creating
// a new launch template, you can use the Amazon EC2 console. The API, SDKs,
// and CLI do not support cloning a template. For more information, see Create
// a launch template from an existing launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template-from-existing-launch-template)
// To clone an existing launch template as the basis for a new launch template,
// use the Amazon EC2 console. The API, SDKs, and CLI do not support cloning
// a template. For more information, see Create a launch template from an existing
// launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template-from-existing-launch-template)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@ -6630,15 +6630,17 @@ func (c *EC2) CreateLaunchTemplateVersionRequest(input *CreateLaunchTemplateVers
// CreateLaunchTemplateVersion API operation for Amazon Elastic Compute Cloud.
//
// Creates a new version of a launch template. You can specify an existing version
// of launch template from which to base the new version.
// Creates a new version of a launch template. You must specify an existing
// launch template, either by name or ID. You can determine whether the new
// version inherits parameters from a source version, and add or overwrite parameters
// as needed.
//
// Launch template versions are numbered in the order in which they are created.
// You cannot specify, change, or replace the numbering of launch template versions.
// You can't specify, change, or replace the numbering of launch template versions.
//
// Launch templates are immutable; after you create a launch template, you can't
// modify it. Instead, you can create a new version of the launch template that
// includes any changes you require.
// includes the changes that you require.
//
// For more information, see Modify a launch template (manage launch template
// versions) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions)
@ -15571,9 +15573,10 @@ func (c *EC2) DeleteTransitGatewayRouteTableRequest(input *DeleteTransitGatewayR
// DeleteTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud.
//
// Deletes the specified transit gateway route table. You must disassociate
// the route table from any transit gateway route tables before you can delete
// it.
// Deletes the specified transit gateway route table. If there are any route
// tables associated with the transit gateway route table, you must first run
// DisassociateRouteTable before you can delete the transit gateway route table.
// This removes any route tables associated with the transit gateway route table.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@ -22209,6 +22212,9 @@ func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Re
// AMI are terminated, specifying the ID of the image will eventually return
// an error indicating that the AMI ID cannot be found.
//
// We strongly recommend using only paginated requests. Unpaginated requests
// are susceptible to throttling and timeouts.
//
// The order of the elements in the response, including those within nested
// structures, might vary. Applications should not assume the elements appear
// in a particular order.
@ -23761,6 +23767,9 @@ func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *requ
// If you describe instances and specify only instance IDs that are in an unaffected
// zone, the call works normally.
//
// We strongly recommend using only paginated requests. Unpaginated requests
// are susceptible to throttling and timeouts.
//
// The order of the elements in the response, including those within nested
// structures, might vary. Applications should not assume the elements appear
// in a particular order.
@ -27473,6 +27482,9 @@ func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesI
// you use pagination or one of the following filters: group-id, mac-address,
// private-dns-name, private-ip-address, private-dns-name, subnet-id, or vpc-id.
//
// We strongly recommend using only paginated requests. Unpaginated requests
// are susceptible to throttling and timeouts.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
@ -29759,6 +29771,9 @@ func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *requ
// For more information about EBS snapshots, see Amazon EBS snapshots (https://docs.aws.amazon.com/ebs/latest/userguide/ebs-snapshots.html)
// in the Amazon EBS User Guide.
//
// We strongly recommend using only paginated requests. Unpaginated requests
// are susceptible to throttling and timeouts.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
@ -30949,6 +30964,9 @@ func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Reques
// For more information about tags, see Tag your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// We strongly recommend using only paginated requests. Unpaginated requests
// are susceptible to throttling and timeouts.
//
// The order of the elements in the response, including those within nested
// structures, might vary. Applications should not assume the elements appear
// in a particular order.
@ -33813,6 +33831,9 @@ func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.
// For more information about EBS volumes, see Amazon EBS volumes (https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volumes.html)
// in the Amazon EBS User Guide.
//
// We strongly recommend using only paginated requests. Unpaginated requests
// are susceptible to throttling and timeouts.
//
// The order of the elements in the response, including those within nested
// structures, might vary. Applications should not assume the elements appear
// in a particular order.
@ -36570,6 +36591,87 @@ func (c *EC2) DisableImageDeprecationWithContext(ctx aws.Context, input *Disable
return out, req.Send()
}
const opDisableImageDeregistrationProtection = "DisableImageDeregistrationProtection"
// DisableImageDeregistrationProtectionRequest generates a "aws/request.Request" representing the
// client's request for the DisableImageDeregistrationProtection operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DisableImageDeregistrationProtection for more information on using the DisableImageDeregistrationProtection
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the DisableImageDeregistrationProtectionRequest method.
// req, resp := client.DisableImageDeregistrationProtectionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableImageDeregistrationProtection
func (c *EC2) DisableImageDeregistrationProtectionRequest(input *DisableImageDeregistrationProtectionInput) (req *request.Request, output *DisableImageDeregistrationProtectionOutput) {
op := &request.Operation{
Name: opDisableImageDeregistrationProtection,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisableImageDeregistrationProtectionInput{}
}
output = &DisableImageDeregistrationProtectionOutput{}
req = c.newRequest(op, input, output)
return
}
// DisableImageDeregistrationProtection API operation for Amazon Elastic Compute Cloud.
//
// Disables deregistration protection for an AMI. When deregistration protection
// is disabled, the AMI can be deregistered.
//
// If you chose to include a 24-hour cooldown period when you enabled deregistration
// protection for the AMI, then, when you disable deregistration protection,
// you wont immediately be able to deregister the AMI.
//
// For more information, see Protect an AMI from deregistration (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/deregister-ami.html#ami-deregistration-protection)
// in the Amazon EC2 User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisableImageDeregistrationProtection for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableImageDeregistrationProtection
func (c *EC2) DisableImageDeregistrationProtection(input *DisableImageDeregistrationProtectionInput) (*DisableImageDeregistrationProtectionOutput, error) {
req, out := c.DisableImageDeregistrationProtectionRequest(input)
return out, req.Send()
}
// DisableImageDeregistrationProtectionWithContext is the same as DisableImageDeregistrationProtection with the addition of
// the ability to pass a context and additional request options.
//
// See DisableImageDeregistrationProtection for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *EC2) DisableImageDeregistrationProtectionWithContext(ctx aws.Context, input *DisableImageDeregistrationProtectionInput, opts ...request.Option) (*DisableImageDeregistrationProtectionOutput, error) {
req, out := c.DisableImageDeregistrationProtectionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDisableIpamOrganizationAdminAccount = "DisableIpamOrganizationAdminAccount"
// DisableIpamOrganizationAdminAccountRequest generates a "aws/request.Request" representing the
@ -38903,6 +39005,86 @@ func (c *EC2) EnableImageDeprecationWithContext(ctx aws.Context, input *EnableIm
return out, req.Send()
}
const opEnableImageDeregistrationProtection = "EnableImageDeregistrationProtection"
// EnableImageDeregistrationProtectionRequest generates a "aws/request.Request" representing the
// client's request for the EnableImageDeregistrationProtection operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See EnableImageDeregistrationProtection for more information on using the EnableImageDeregistrationProtection
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the EnableImageDeregistrationProtectionRequest method.
// req, resp := client.EnableImageDeregistrationProtectionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableImageDeregistrationProtection
func (c *EC2) EnableImageDeregistrationProtectionRequest(input *EnableImageDeregistrationProtectionInput) (req *request.Request, output *EnableImageDeregistrationProtectionOutput) {
op := &request.Operation{
Name: opEnableImageDeregistrationProtection,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &EnableImageDeregistrationProtectionInput{}
}
output = &EnableImageDeregistrationProtectionOutput{}
req = c.newRequest(op, input, output)
return
}
// EnableImageDeregistrationProtection API operation for Amazon Elastic Compute Cloud.
//
// Enables deregistration protection for an AMI. When deregistration protection
// is enabled, the AMI can't be deregistered.
//
// To allow the AMI to be deregistered, you must first disable deregistration
// protection using DisableImageDeregistrationProtection.
//
// For more information, see Protect an AMI from deregistration (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/deregister-ami.html#ami-deregistration-protection)
// in the Amazon EC2 User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation EnableImageDeregistrationProtection for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableImageDeregistrationProtection
func (c *EC2) EnableImageDeregistrationProtection(input *EnableImageDeregistrationProtectionInput) (*EnableImageDeregistrationProtectionOutput, error) {
req, out := c.EnableImageDeregistrationProtectionRequest(input)
return out, req.Send()
}
// EnableImageDeregistrationProtectionWithContext is the same as EnableImageDeregistrationProtection with the addition of
// the ability to pass a context and additional request options.
//
// See EnableImageDeregistrationProtection for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *EC2) EnableImageDeregistrationProtectionWithContext(ctx aws.Context, input *EnableImageDeregistrationProtectionInput, opts ...request.Option) (*EnableImageDeregistrationProtectionOutput, error) {
req, out := c.EnableImageDeregistrationProtectionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opEnableIpamOrganizationAdminAccount = "EnableIpamOrganizationAdminAccount"
// EnableIpamOrganizationAdminAccountRequest generates a "aws/request.Request" representing the
@ -62346,12 +62528,12 @@ type AssociatedRole struct {
// The name of the Amazon S3 bucket in which the Amazon S3 object is stored.
CertificateS3BucketName *string `locationName:"certificateS3BucketName" type:"string"`
// The key of the Amazon S3 object ey where the certificate, certificate chain,
// and encrypted private key bundle is stored. The object key is formated as
// follows: role_arn/certificate_arn.
// The key of the Amazon S3 object where the certificate, certificate chain,
// and encrypted private key bundle are stored. The object key is formatted
// as follows: role_arn/certificate_arn.
CertificateS3ObjectKey *string `locationName:"certificateS3ObjectKey" type:"string"`
// The ID of the KMS customer master key (CMK) used to encrypt the private key.
// The ID of the KMS key used to encrypt the private key.
EncryptionKmsKeyId *string `locationName:"encryptionKmsKeyId" type:"string"`
}
@ -74404,14 +74586,14 @@ type CreateLaunchTemplateVersionInput struct {
// The ID of the launch template.
//
// You must specify either the LaunchTemplateId or the LaunchTemplateName, but
// not both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateId *string `type:"string"`
// The name of the launch template.
//
// You must specify the LaunchTemplateName or the LaunchTemplateId, but not
// both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateName *string `min:"3" type:"string"`
// If true, and if a Systems Manager parameter is specified for ImageId, the
@ -74422,11 +74604,17 @@ type CreateLaunchTemplateVersionInput struct {
// Default: false
ResolveAlias *bool `type:"boolean"`
// The version number of the launch template version on which to base the new
// version. The new version inherits the same launch parameters as the source
// version, except for parameters that you specify in LaunchTemplateData. Snapshots
// The version of the launch template on which to base the new version. Snapshots
// applied to the block device mapping are ignored when creating a new version
// unless they are explicitly included.
//
// If you specify this parameter, the new version inherits the launch parameters
// from the source version. If you specify additional launch parameters for
// the new version, they overwrite any corresponding launch parameters inherited
// from the source version.
//
// If you omit this parameter, the new version contains only the launch parameters
// that you specify for the new version.
SourceVersion *string `type:"string"`
// A description for the version of the launch template.
@ -85309,14 +85497,14 @@ type DeleteLaunchTemplateInput struct {
// The ID of the launch template.
//
// You must specify either the LaunchTemplateId or the LaunchTemplateName, but
// not both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateId *string `type:"string"`
// The name of the launch template.
//
// You must specify either the LaunchTemplateName or the LaunchTemplateId, but
// not both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateName *string `min:"3" type:"string"`
}
@ -85411,14 +85599,14 @@ type DeleteLaunchTemplateVersionsInput struct {
// The ID of the launch template.
//
// You must specify either the LaunchTemplateId or the LaunchTemplateName, but
// not both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateId *string `type:"string"`
// The name of the launch template.
//
// You must specify either the LaunchTemplateName or the LaunchTemplateId, but
// not both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateName *string `min:"3" type:"string"`
// The version numbers of one or more launch template versions to delete. You
@ -96839,6 +97027,9 @@ type DescribeImageAttributeOutput struct {
// The boot mode.
BootMode *AttributeValue `locationName:"bootMode" type:"structure"`
// Indicates whether deregistration protection is enabled for the AMI.
DeregistrationProtection *AttributeValue `locationName:"deregistrationProtection" type:"structure"`
// A description for the AMI.
Description *AttributeValue `locationName:"description" type:"structure"`
@ -96918,6 +97109,12 @@ func (s *DescribeImageAttributeOutput) SetBootMode(v *AttributeValue) *DescribeI
return s
}
// SetDeregistrationProtection sets the DeregistrationProtection field's value.
func (s *DescribeImageAttributeOutput) SetDeregistrationProtection(v *AttributeValue) *DescribeImageAttributeOutput {
s.DeregistrationProtection = v
return s
}
// SetDescription sets the Description field's value.
func (s *DescribeImageAttributeOutput) SetDescription(v *AttributeValue) *DescribeImageAttributeOutput {
s.Description = v
@ -100689,7 +100886,8 @@ type DescribeLaunchTemplateVersionsInput struct {
// The ID of the launch template.
//
// To describe one or more versions of a specified launch template, you must
// specify either the LaunchTemplateId or the LaunchTemplateName, but not both.
// specify either the launch template ID or the launch template name, but not
// both.
//
// To describe all the latest or default launch template versions in your account,
// you must omit this parameter.
@ -100698,7 +100896,8 @@ type DescribeLaunchTemplateVersionsInput struct {
// The name of the launch template.
//
// To describe one or more versions of a specified launch template, you must
// specify either the LaunchTemplateName or the LaunchTemplateId, but not both.
// specify either the launch template name or the launch template ID, but not
// both.
//
// To describe all the latest or default launch template versions in your account,
// you must omit this parameter.
@ -103362,6 +103561,11 @@ func (s *DescribeNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string)
type DescribeNetworkInterfaceAttributeOutput struct {
_ struct{} `type:"structure"`
// Indicates whether to assign a public IPv4 address to a network interface.
// This option can be enabled for any network interface but will only apply
// to the primary network interface (eth0).
AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"`
// The attachment (if any) of the network interface.
Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"`
@ -103396,6 +103600,12 @@ func (s DescribeNetworkInterfaceAttributeOutput) GoString() string {
return s.String()
}
// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.
func (s *DescribeNetworkInterfaceAttributeOutput) SetAssociatePublicIpAddress(v bool) *DescribeNetworkInterfaceAttributeOutput {
s.AssociatePublicIpAddress = &v
return s
}
// SetAttachment sets the Attachment field's value.
func (s *DescribeNetworkInterfaceAttributeOutput) SetAttachment(v *NetworkInterfaceAttachment) *DescribeNetworkInterfaceAttributeOutput {
s.Attachment = v
@ -103757,7 +103967,7 @@ func (s *DescribeNetworkInterfacesInput) SetNextToken(v string) *DescribeNetwork
type DescribeNetworkInterfacesOutput struct {
_ struct{} `type:"structure"`
// Information about one or more network interfaces.
// Information about the network interfaces.
NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
// The token to include in another request to get the next page of items. This
@ -107854,13 +108064,8 @@ type DescribeTagsInput struct {
//
// * resource-id - The ID of the resource.
//
// * resource-type - The resource type (customer-gateway | dedicated-host
// | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation |
// image | instance | internet-gateway | key-pair | launch-template | natgateway
// | network-acl | network-interface | placement-group | reserved-instances
// | route-table | security-group | snapshot | spot-instances-request | subnet
// | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection
// | vpn-connection | vpn-gateway).
// * resource-type - The resource type. For a list of possible values, see
// TagSpecification (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TagSpecification.html).
//
// * tag:<key> - The key/value combination of the tag. For example, specify
// "tag:Owner" for the filter name and "TeamA" for the filter value to find
@ -109638,6 +109843,12 @@ type DescribeTransitGatewaysInput struct {
// | modifying | pending).
//
// * transit-gateway-id - The ID of the transit gateway.
//
// * tag-key - The key/value combination of a tag assigned to the resource.
// Use the tag key in the filter name and the tag value as the filter value.
// For example, to find all resources that have a tag with the key Owner
// and the value TeamA, specify tag:Owner for the filter name and TeamA for
// the filter value.
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
// The maximum number of results to return with a single call. To retrieve the
@ -114702,6 +114913,95 @@ func (s *DisableImageDeprecationOutput) SetReturn(v bool) *DisableImageDeprecati
return s
}
type DisableImageDeregistrationProtectionInput struct {
_ struct{} `type:"structure"`
// Checks whether you have the required permissions for the action, without
// actually making the request, and provides an error response. If you have
// the required permissions, the error response is DryRunOperation. Otherwise,
// it is UnauthorizedOperation.
DryRun *bool `type:"boolean"`
// The ID of the AMI.
//
// ImageId is a required field
ImageId *string `type:"string" required:"true"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DisableImageDeregistrationProtectionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DisableImageDeregistrationProtectionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DisableImageDeregistrationProtectionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DisableImageDeregistrationProtectionInput"}
if s.ImageId == nil {
invalidParams.Add(request.NewErrParamRequired("ImageId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDryRun sets the DryRun field's value.
func (s *DisableImageDeregistrationProtectionInput) SetDryRun(v bool) *DisableImageDeregistrationProtectionInput {
s.DryRun = &v
return s
}
// SetImageId sets the ImageId field's value.
func (s *DisableImageDeregistrationProtectionInput) SetImageId(v string) *DisableImageDeregistrationProtectionInput {
s.ImageId = &v
return s
}
type DisableImageDeregistrationProtectionOutput struct {
_ struct{} `type:"structure"`
// Returns true if the request succeeds; otherwise, it returns an error.
Return *string `locationName:"return" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DisableImageDeregistrationProtectionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DisableImageDeregistrationProtectionOutput) GoString() string {
return s.String()
}
// SetReturn sets the Return field's value.
func (s *DisableImageDeregistrationProtectionOutput) SetReturn(v string) *DisableImageDeregistrationProtectionOutput {
s.Return = &v
return s
}
type DisableImageInput struct {
_ struct{} `type:"structure"`
@ -119674,6 +119974,105 @@ func (s *EnableImageDeprecationOutput) SetReturn(v bool) *EnableImageDeprecation
return s
}
type EnableImageDeregistrationProtectionInput struct {
_ struct{} `type:"structure"`
// Checks whether you have the required permissions for the action, without
// actually making the request, and provides an error response. If you have
// the required permissions, the error response is DryRunOperation. Otherwise,
// it is UnauthorizedOperation.
DryRun *bool `type:"boolean"`
// The ID of the AMI.
//
// ImageId is a required field
ImageId *string `type:"string" required:"true"`
// If true, enforces deregistration protection for 24 hours after deregistration
// protection is disabled.
WithCooldown *bool `type:"boolean"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EnableImageDeregistrationProtectionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EnableImageDeregistrationProtectionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *EnableImageDeregistrationProtectionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "EnableImageDeregistrationProtectionInput"}
if s.ImageId == nil {
invalidParams.Add(request.NewErrParamRequired("ImageId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDryRun sets the DryRun field's value.
func (s *EnableImageDeregistrationProtectionInput) SetDryRun(v bool) *EnableImageDeregistrationProtectionInput {
s.DryRun = &v
return s
}
// SetImageId sets the ImageId field's value.
func (s *EnableImageDeregistrationProtectionInput) SetImageId(v string) *EnableImageDeregistrationProtectionInput {
s.ImageId = &v
return s
}
// SetWithCooldown sets the WithCooldown field's value.
func (s *EnableImageDeregistrationProtectionInput) SetWithCooldown(v bool) *EnableImageDeregistrationProtectionInput {
s.WithCooldown = &v
return s
}
type EnableImageDeregistrationProtectionOutput struct {
_ struct{} `type:"structure"`
// Returns true if the request succeeds; otherwise, it returns an error.
Return *string `locationName:"return" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EnableImageDeregistrationProtectionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EnableImageDeregistrationProtectionOutput) GoString() string {
return s.String()
}
// SetReturn sets the Return field's value.
func (s *EnableImageDeregistrationProtectionOutput) SetReturn(v string) *EnableImageDeregistrationProtectionOutput {
s.Return = &v
return s
}
type EnableImageInput struct {
_ struct{} `type:"structure"`
@ -131823,6 +132222,9 @@ type Image struct {
// the seconds to the nearest minute.
DeprecationTime *string `locationName:"deprecationTime" type:"string"`
// Indicates whether deregistration protection is enabled for the AMI.
DeregistrationProtection *string `locationName:"deregistrationProtection" type:"string"`
// The description of the AMI that was provided during image creation.
Description *string `locationName:"description" type:"string"`
@ -131856,6 +132258,13 @@ type Image struct {
// images.
KernelId *string `locationName:"kernelId" type:"string"`
// The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601),
// when the AMI was last used to launch an EC2 instance. When the AMI is used
// to launch an instance, there is a 24-hour delay before that usage is reported.
//
// lastLaunchedTime data is available starting April 2017.
LastLaunchedTime *string `locationName:"lastLaunchedTime" type:"string"`
// The name of the AMI that was provided during image creation.
Name *string `locationName:"name" type:"string"`
@ -131975,6 +132384,12 @@ func (s *Image) SetDeprecationTime(v string) *Image {
return s
}
// SetDeregistrationProtection sets the DeregistrationProtection field's value.
func (s *Image) SetDeregistrationProtection(v string) *Image {
s.DeregistrationProtection = &v
return s
}
// SetDescription sets the Description field's value.
func (s *Image) SetDescription(v string) *Image {
s.Description = &v
@ -132029,6 +132444,12 @@ func (s *Image) SetKernelId(v string) *Image {
return s
}
// SetLastLaunchedTime sets the LastLaunchedTime field's value.
func (s *Image) SetLastLaunchedTime(v string) *Image {
s.LastLaunchedTime = &v
return s
}
// SetName sets the Name field's value.
func (s *Image) SetName(v string) *Image {
s.Name = &v
@ -144125,7 +144546,11 @@ type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct {
// A description for the network interface.
Description *string `type:"string"`
// The device index for the network interface attachment.
// The device index for the network interface attachment. Each network interface
// requires a device index. If you create a launch template that includes secondary
// network interfaces but not a primary network interface, then you must add
// a primary network interface as a launch parameter when you launch an instance
// from the template.
DeviceIndex *int64 `type:"integer"`
// Configure ENA Express settings for your launch template.
@ -144851,30 +145276,27 @@ func (s *LaunchTemplatePrivateDnsNameOptionsRequest) SetHostnameType(v string) *
return s
}
// The launch template to use. You must specify either the launch template ID
// or launch template name in the request, but not both.
// Describes the launch template to use.
type LaunchTemplateSpecification struct {
_ struct{} `type:"structure"`
// The ID of the launch template.
//
// You must specify the LaunchTemplateId or the LaunchTemplateName, but not
// both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateId *string `type:"string"`
// The name of the launch template.
//
// You must specify the LaunchTemplateName or the LaunchTemplateId, but not
// both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateName *string `type:"string"`
// The launch template version number, $Latest, or $Default.
//
// If the value is $Latest, Amazon EC2 uses the latest version of the launch
// template.
// A value of $Latest uses the latest version of the launch template.
//
// If the value is $Default, Amazon EC2 uses the default version of the launch
// template.
// A value of $Default uses the default version of the launch template.
//
// Default: The default version of the launch template.
Version *string `type:"string"`
@ -151268,14 +151690,14 @@ type ModifyLaunchTemplateInput struct {
// The ID of the launch template.
//
// You must specify either the LaunchTemplateId or the LaunchTemplateName, but
// not both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateId *string `type:"string"`
// The name of the launch template.
//
// You must specify either the LaunchTemplateName or the LaunchTemplateId, but
// not both.
// You must specify either the launch template ID or the launch template name,
// but not both.
LaunchTemplateName *string `min:"3" type:"string"`
}
@ -151663,6 +152085,11 @@ func (s *ModifyManagedPrefixListOutput) SetPrefixList(v *ManagedPrefixList) *Mod
type ModifyNetworkInterfaceAttributeInput struct {
_ struct{} `type:"structure"`
// Indicates whether to assign a public IPv4 address to a network interface.
// This option can be enabled for any network interface but will only apply
// to the primary network interface (eth0).
AssociatePublicIpAddress *bool `type:"boolean"`
// Information about the interface attachment. If modifying the delete on termination
// attribute, you must specify the ID of the interface attachment.
Attachment *NetworkInterfaceAttachmentChanges `locationName:"attachment" type:"structure"`
@ -151749,6 +152176,12 @@ func (s *ModifyNetworkInterfaceAttributeInput) Validate() error {
return nil
}
// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.
func (s *ModifyNetworkInterfaceAttributeInput) SetAssociatePublicIpAddress(v bool) *ModifyNetworkInterfaceAttributeInput {
s.AssociatePublicIpAddress = &v
return s
}
// SetAttachment sets the Attachment field's value.
func (s *ModifyNetworkInterfaceAttributeInput) SetAttachment(v *NetworkInterfaceAttachmentChanges) *ModifyNetworkInterfaceAttributeInput {
s.Attachment = v
@ -172050,9 +172483,8 @@ type RunInstancesInput struct {
// you choose an AMI that is configured to allow users another way to log in.
KeyName *string `type:"string"`
// The launch template to use to launch the instances. Any parameters that you
// specify in RunInstances override the same parameters in the launch template.
// You can specify either the name or ID of a launch template, but not both.
// The launch template. Any additional parameters that you specify for the new
// instance overwrite the corresponding parameters included in the launch template.
LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
// The license configurations.
@ -187644,6 +188076,9 @@ func (s *VgwTelemetry) SetStatusMessage(v string) *VgwTelemetry {
type Volume struct {
_ struct{} `type:"structure"`
//
// This parameter is not returned by CreateVolume.
//
// Information about the volume attachments.
Attachments []*VolumeAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"`
@ -187656,6 +188091,9 @@ type Volume struct {
// Indicates whether the volume is encrypted.
Encrypted *bool `locationName:"encrypted" type:"boolean"`
//
// This parameter is not returned by CreateVolume.
//
// Indicates whether the volume was created using fast snapshot restore.
FastRestored *bool `locationName:"fastRestored" type:"boolean"`
@ -187681,6 +188119,9 @@ type Volume struct {
// The snapshot from which the volume was created, if applicable.
SnapshotId *string `locationName:"snapshotId" type:"string"`
//
// This parameter is not returned by CreateVolume.
//
// Reserved for future use.
SseType *string `locationName:"sseType" type:"string" enum:"SSEType"`
@ -193066,6 +193507,9 @@ const (
// ImageAttributeNameImdsSupport is a ImageAttributeName enum value
ImageAttributeNameImdsSupport = "imdsSupport"
// ImageAttributeNameDeregistrationProtection is a ImageAttributeName enum value
ImageAttributeNameDeregistrationProtection = "deregistrationProtection"
)
// ImageAttributeName_Values returns all elements of the ImageAttributeName enum
@ -193083,6 +193527,7 @@ func ImageAttributeName_Values() []string {
ImageAttributeNameUefiData,
ImageAttributeNameLastLaunchedTime,
ImageAttributeNameImdsSupport,
ImageAttributeNameDeregistrationProtection,
}
}
@ -198070,6 +198515,9 @@ const (
// NetworkInterfaceAttributeAttachment is a NetworkInterfaceAttribute enum value
NetworkInterfaceAttributeAttachment = "attachment"
// NetworkInterfaceAttributeAssociatePublicIpAddress is a NetworkInterfaceAttribute enum value
NetworkInterfaceAttributeAssociatePublicIpAddress = "associatePublicIpAddress"
)
// NetworkInterfaceAttribute_Values returns all elements of the NetworkInterfaceAttribute enum
@ -198079,6 +198527,7 @@ func NetworkInterfaceAttribute_Values() []string {
NetworkInterfaceAttributeGroupSet,
NetworkInterfaceAttributeSourceDestCheck,
NetworkInterfaceAttributeAttachment,
NetworkInterfaceAttributeAssociatePublicIpAddress,
}
}

View file

@ -1,5 +1,17 @@
# Changelog
## 0.27.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.27.0.
### Breaking Changes
- `Exception.ThreadId` is now typed as `uint64`. It was wrongly typed as `string` before. ([#770](https://github.com/getsentry/sentry-go/pull/770))
### Misc
- Export `Event.Attachments` ([#771](https://github.com/getsentry/sentry-go/pull/771))
## 0.26.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.26.0.

View file

@ -241,7 +241,7 @@ type Exception struct {
Type string `json:"type,omitempty"` // used as the main issue title
Value string `json:"value,omitempty"` // used as the main issue subtitle
Module string `json:"module,omitempty"`
ThreadID string `json:"thread_id,omitempty"`
ThreadID uint64 `json:"thread_id,omitempty"`
Stacktrace *Stacktrace `json:"stacktrace,omitempty"`
Mechanism *Mechanism `json:"mechanism,omitempty"`
}
@ -317,6 +317,7 @@ type Event struct {
Request *Request `json:"request,omitempty"`
Exception []Exception `json:"exception,omitempty"`
DebugMeta *DebugMeta `json:"debug_meta,omitempty"`
Attachments []*Attachment `json:"-"`
// The fields below are only relevant for transactions.
@ -333,7 +334,6 @@ type Event struct {
// The fields below are not part of the final JSON payload.
sdkMetaData SDKMetaData
attachments []*Attachment
}
// SetException appends the unwrapped errors to the event's exception list.

View file

@ -344,7 +344,7 @@ func (scope *Scope) ApplyToEvent(event *Event, hint *EventHint) *Event {
}
if len(scope.attachments) > 0 {
event.attachments = append(event.attachments, scope.attachments...)
event.Attachments = append(event.Attachments, scope.attachments...)
}
if len(scope.tags) > 0 {

View file

@ -6,7 +6,7 @@ import (
)
// The version of the SDK.
const SDKVersion = "0.26.0"
const SDKVersion = "0.27.0"
// apiVersion is the minimum version of the Sentry API compatible with the
// sentry-go SDK.

View file

@ -185,7 +185,7 @@ func envelopeFromBody(event *Event, dsn *Dsn, sentAt time.Time, body json.RawMes
}
// Attachments
for _, attachment := range event.attachments {
for _, attachment := range event.Attachments {
if err := encodeAttachment(enc, &b, attachment); err != nil {
return nil, err
}

View file

@ -62,7 +62,7 @@ func (m *SigningMethodECDSA) Verify(signingString string, sig []byte, key interf
case *ecdsa.PublicKey:
ecdsaKey = k
default:
return newError("ECDSA verify expects *ecsda.PublicKey", ErrInvalidKeyType)
return newError("ECDSA verify expects *ecdsa.PublicKey", ErrInvalidKeyType)
}
if len(sig) != 2*m.KeySize {
@ -96,7 +96,7 @@ func (m *SigningMethodECDSA) Sign(signingString string, key interface{}) ([]byte
case *ecdsa.PrivateKey:
ecdsaKey = k
default:
return nil, newError("ECDSA sign expects *ecsda.PrivateKey", ErrInvalidKeyType)
return nil, newError("ECDSA sign expects *ecdsa.PrivateKey", ErrInvalidKeyType)
}
// Create the hasher

View file

@ -91,7 +91,7 @@ func (m *SigningMethodHMAC) Verify(signingString string, sig []byte, key interfa
func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) ([]byte, error) {
if keyBytes, ok := key.([]byte); ok {
if !m.Hash.Available() {
return nil, newError("HMAC sign expects []byte", ErrInvalidKeyType)
return nil, ErrHashUnavailable
}
hasher := hmac.New(m.Hash.New, keyBytes)
@ -100,5 +100,5 @@ func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) ([]byte,
return hasher.Sum(nil), nil
}
return nil, ErrInvalidKeyType
return nil, newError("HMAC sign expects []byte", ErrInvalidKeyType)
}

View file

@ -1,4 +1,10 @@
## v1.10.0 (2024-02-27)
## v1.11.0 (2024-03-07)
This version reverts the inclusion of Context in the v1 branch. This inclusion
didn't add much value because no packages were using it; on the other hand, it
introduced a bug when using the Context property of the Provider client.
## v1.10.0 (2024-02-27) **RETRACTED**: see https://github.com/gophercloud/gophercloud/issues/2969
* [GH-2893](https://github.com/gophercloud/gophercloud/pull/2893) [v1] authentication: Add WithContext functions
* [GH-2894](https://github.com/gophercloud/gophercloud/pull/2894) [v1] pager: Add WithContext functions
@ -8,7 +14,7 @@
* [GH-2933](https://github.com/gophercloud/gophercloud/pull/2933) [v1] Fix AllowReauth reauthentication
* [GH-2950](https://github.com/gophercloud/gophercloud/pull/2950) [v1] compute: Use volumeID, not attachmentID for volume attachments
## v1.9.0 (2024-02-02)
## v1.9.0 (2024-02-02) **RETRACTED**: see https://github.com/gophercloud/gophercloud/issues/2969
New features and improvements:

View file

@ -1,739 +0,0 @@
package ctxt
// This file is package context of the standard library that ships with Go
// v1.21.6. It has been vendored to import AfterFunc.
//
// Changes made to the original file:
// * replace "internal/reflectlite" with "reflect" in the imports
// * replace "any" with "interface{}"
// * remove the atomic.Int32 type that only exists for testing and is not
// compatible with Go v1.14.
//
// https://cs.opensource.google/go/go/+/refs/tags/go1.21.6:src/context/context.go
import (
"errors"
reflectlite "reflect"
"sync"
"sync/atomic"
"time"
)
// A Context carries a deadline, a cancellation signal, and other values across
// API boundaries.
//
// Context's methods may be called by multiple goroutines simultaneously.
type Context interface {
// Deadline returns the time when work done on behalf of this context
// should be canceled. Deadline returns ok==false when no deadline is
// set. Successive calls to Deadline return the same results.
Deadline() (deadline time.Time, ok bool)
// Done returns a channel that's closed when work done on behalf of this
// context should be canceled. Done may return nil if this context can
// never be canceled. Successive calls to Done return the same value.
// The close of the Done channel may happen asynchronously,
// after the cancel function returns.
//
// WithCancel arranges for Done to be closed when cancel is called;
// WithDeadline arranges for Done to be closed when the deadline
// expires; WithTimeout arranges for Done to be closed when the timeout
// elapses.
//
// Done is provided for use in select statements:
//
// // Stream generates values with DoSomething and sends them to out
// // until DoSomething returns an error or ctx.Done is closed.
// func Stream(ctx context.Context, out chan<- Value) error {
// for {
// v, err := DoSomething(ctx)
// if err != nil {
// return err
// }
// select {
// case <-ctx.Done():
// return ctx.Err()
// case out <- v:
// }
// }
// }
//
// See https://blog.golang.org/pipelines for more examples of how to use
// a Done channel for cancellation.
Done() <-chan struct{}
// If Done is not yet closed, Err returns nil.
// If Done is closed, Err returns a non-nil error explaining why:
// Canceled if the context was canceled
// or DeadlineExceeded if the context's deadline passed.
// After Err returns a non-nil error, successive calls to Err return the same error.
Err() error
// Value returns the value associated with this context for key, or nil
// if no value is associated with key. Successive calls to Value with
// the same key returns the same result.
//
// Use context values only for request-scoped data that transits
// processes and API boundaries, not for passing optional parameters to
// functions.
//
// A key identifies a specific value in a Context. Functions that wish
// to store values in Context typically allocate a key in a global
// variable then use that key as the argument to context.WithValue and
// Context.Value. A key can be any type that supports equality;
// packages should define keys as an unexported type to avoid
// collisions.
//
// Packages that define a Context key should provide type-safe accessors
// for the values stored using that key:
//
// // Package user defines a User type that's stored in Contexts.
// package user
//
// import "context"
//
// // User is the type of value stored in the Contexts.
// type User struct {...}
//
// // key is an unexported type for keys defined in this package.
// // This prevents collisions with keys defined in other packages.
// type key int
//
// // userKey is the key for user.User values in Contexts. It is
// // unexported; clients use user.NewContext and user.FromContext
// // instead of using this key directly.
// var userKey key
//
// // NewContext returns a new Context that carries value u.
// func NewContext(ctx context.Context, u *User) context.Context {
// return context.WithValue(ctx, userKey, u)
// }
//
// // FromContext returns the User value stored in ctx, if any.
// func FromContext(ctx context.Context) (*User, bool) {
// u, ok := ctx.Value(userKey).(*User)
// return u, ok
// }
Value(key interface{}) interface{}
}
// Canceled is the error returned by [Context.Err] when the context is canceled.
var Canceled = errors.New("context canceled")
// DeadlineExceeded is the error returned by [Context.Err] when the context's
// deadline passes.
var DeadlineExceeded error = deadlineExceededError{}
type deadlineExceededError struct{}
func (deadlineExceededError) Error() string { return "context deadline exceeded" }
func (deadlineExceededError) Timeout() bool { return true }
func (deadlineExceededError) Temporary() bool { return true }
// An emptyCtx is never canceled, has no values, and has no deadline.
// It is the common base of backgroundCtx and todoCtx.
type emptyCtx struct{}
func (emptyCtx) Deadline() (deadline time.Time, ok bool) {
return
}
func (emptyCtx) Done() <-chan struct{} {
return nil
}
func (emptyCtx) Err() error {
return nil
}
func (emptyCtx) Value(key interface{}) interface{} {
return nil
}
type backgroundCtx struct{ emptyCtx }
func (backgroundCtx) String() string {
return "context.Background"
}
type todoCtx struct{ emptyCtx }
func (todoCtx) String() string {
return "context.TODO"
}
// Background returns a non-nil, empty [Context]. It is never canceled, has no
// values, and has no deadline. It is typically used by the main function,
// initialization, and tests, and as the top-level Context for incoming
// requests.
func Background() Context {
return backgroundCtx{}
}
// TODO returns a non-nil, empty [Context]. Code should use context.TODO when
// it's unclear which Context to use or it is not yet available (because the
// surrounding function has not yet been extended to accept a Context
// parameter).
func TODO() Context {
return todoCtx{}
}
// A CancelFunc tells an operation to abandon its work.
// A CancelFunc does not wait for the work to stop.
// A CancelFunc may be called by multiple goroutines simultaneously.
// After the first call, subsequent calls to a CancelFunc do nothing.
type CancelFunc func()
// WithCancel returns a copy of parent with a new Done channel. The returned
// context's Done channel is closed when the returned cancel function is called
// or when the parent context's Done channel is closed, whichever happens first.
//
// Canceling this context releases resources associated with it, so code should
// call cancel as soon as the operations running in this Context complete.
func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
c := withCancel(parent)
return c, func() { c.cancel(true, Canceled, nil) }
}
// A CancelCauseFunc behaves like a [CancelFunc] but additionally sets the cancellation cause.
// This cause can be retrieved by calling [Cause] on the canceled Context or on
// any of its derived Contexts.
//
// If the context has already been canceled, CancelCauseFunc does not set the cause.
// For example, if childContext is derived from parentContext:
// - if parentContext is canceled with cause1 before childContext is canceled with cause2,
// then Cause(parentContext) == Cause(childContext) == cause1
// - if childContext is canceled with cause2 before parentContext is canceled with cause1,
// then Cause(parentContext) == cause1 and Cause(childContext) == cause2
type CancelCauseFunc func(cause error)
// WithCancelCause behaves like [WithCancel] but returns a [CancelCauseFunc] instead of a [CancelFunc].
// Calling cancel with a non-nil error (the "cause") records that error in ctx;
// it can then be retrieved using Cause(ctx).
// Calling cancel with nil sets the cause to Canceled.
//
// Example use:
//
// ctx, cancel := context.WithCancelCause(parent)
// cancel(myError)
// ctx.Err() // returns context.Canceled
// context.Cause(ctx) // returns myError
func WithCancelCause(parent Context) (ctx Context, cancel CancelCauseFunc) {
c := withCancel(parent)
return c, func(cause error) { c.cancel(true, Canceled, cause) }
}
func withCancel(parent Context) *cancelCtx {
if parent == nil {
panic("cannot create context from nil parent")
}
c := &cancelCtx{}
c.propagateCancel(parent, c)
return c
}
// Cause returns a non-nil error explaining why c was canceled.
// The first cancellation of c or one of its parents sets the cause.
// If that cancellation happened via a call to CancelCauseFunc(err),
// then [Cause] returns err.
// Otherwise Cause(c) returns the same value as c.Err().
// Cause returns nil if c has not been canceled yet.
func Cause(c Context) error {
if cc, ok := c.Value(&cancelCtxKey).(*cancelCtx); ok {
cc.mu.Lock()
defer cc.mu.Unlock()
return cc.cause
}
return nil
}
// AfterFunc arranges to call f in its own goroutine after ctx is done
// (cancelled or timed out).
// If ctx is already done, AfterFunc calls f immediately in its own goroutine.
//
// Multiple calls to AfterFunc on a context operate independently;
// one does not replace another.
//
// Calling the returned stop function stops the association of ctx with f.
// It returns true if the call stopped f from being run.
// If stop returns false,
// either the context is done and f has been started in its own goroutine;
// or f was already stopped.
// The stop function does not wait for f to complete before returning.
// If the caller needs to know whether f is completed,
// it must coordinate with f explicitly.
//
// If ctx has a "AfterFunc(func()) func() bool" method,
// AfterFunc will use it to schedule the call.
func AfterFunc(ctx Context, f func()) (stop func() bool) {
a := &afterFuncCtx{
f: f,
}
a.cancelCtx.propagateCancel(ctx, a)
return func() bool {
stopped := false
a.once.Do(func() {
stopped = true
})
if stopped {
a.cancel(true, Canceled, nil)
}
return stopped
}
}
type afterFuncer interface {
AfterFunc(func()) func() bool
}
type afterFuncCtx struct {
cancelCtx
once sync.Once // either starts running f or stops f from running
f func()
}
func (a *afterFuncCtx) cancel(removeFromParent bool, err, cause error) {
a.cancelCtx.cancel(false, err, cause)
if removeFromParent {
removeChild(a.Context, a)
}
a.once.Do(func() {
go a.f()
})
}
// A stopCtx is used as the parent context of a cancelCtx when
// an AfterFunc has been registered with the parent.
// It holds the stop function used to unregister the AfterFunc.
type stopCtx struct {
Context
stop func() bool
}
// &cancelCtxKey is the key that a cancelCtx returns itself for.
var cancelCtxKey int
// parentCancelCtx returns the underlying *cancelCtx for parent.
// It does this by looking up parent.Value(&cancelCtxKey) to find
// the innermost enclosing *cancelCtx and then checking whether
// parent.Done() matches that *cancelCtx. (If not, the *cancelCtx
// has been wrapped in a custom implementation providing a
// different done channel, in which case we should not bypass it.)
func parentCancelCtx(parent Context) (*cancelCtx, bool) {
done := parent.Done()
if done == closedchan || done == nil {
return nil, false
}
p, ok := parent.Value(&cancelCtxKey).(*cancelCtx)
if !ok {
return nil, false
}
pdone, _ := p.done.Load().(chan struct{})
if pdone != done {
return nil, false
}
return p, true
}
// removeChild removes a context from its parent.
func removeChild(parent Context, child canceler) {
if s, ok := parent.(stopCtx); ok {
s.stop()
return
}
p, ok := parentCancelCtx(parent)
if !ok {
return
}
p.mu.Lock()
if p.children != nil {
delete(p.children, child)
}
p.mu.Unlock()
}
// A canceler is a context type that can be canceled directly. The
// implementations are *cancelCtx and *timerCtx.
type canceler interface {
cancel(removeFromParent bool, err, cause error)
Done() <-chan struct{}
}
// closedchan is a reusable closed channel.
var closedchan = make(chan struct{})
func init() {
close(closedchan)
}
// A cancelCtx can be canceled. When canceled, it also cancels any children
// that implement canceler.
type cancelCtx struct {
Context
mu sync.Mutex // protects following fields
done atomic.Value // of chan struct{}, created lazily, closed by first cancel call
children map[canceler]struct{} // set to nil by the first cancel call
err error // set to non-nil by the first cancel call
cause error // set to non-nil by the first cancel call
}
func (c *cancelCtx) Value(key interface{}) interface{} {
if key == &cancelCtxKey {
return c
}
return value(c.Context, key)
}
func (c *cancelCtx) Done() <-chan struct{} {
d := c.done.Load()
if d != nil {
return d.(chan struct{})
}
c.mu.Lock()
defer c.mu.Unlock()
d = c.done.Load()
if d == nil {
d = make(chan struct{})
c.done.Store(d)
}
return d.(chan struct{})
}
func (c *cancelCtx) Err() error {
c.mu.Lock()
err := c.err
c.mu.Unlock()
return err
}
// propagateCancel arranges for child to be canceled when parent is.
// It sets the parent context of cancelCtx.
func (c *cancelCtx) propagateCancel(parent Context, child canceler) {
c.Context = parent
done := parent.Done()
if done == nil {
return // parent is never canceled
}
select {
case <-done:
// parent is already canceled
child.cancel(false, parent.Err(), Cause(parent))
return
default:
}
if p, ok := parentCancelCtx(parent); ok {
// parent is a *cancelCtx, or derives from one.
p.mu.Lock()
if p.err != nil {
// parent has already been canceled
child.cancel(false, p.err, p.cause)
} else {
if p.children == nil {
p.children = make(map[canceler]struct{})
}
p.children[child] = struct{}{}
}
p.mu.Unlock()
return
}
if a, ok := parent.(afterFuncer); ok {
// parent implements an AfterFunc method.
c.mu.Lock()
stop := a.AfterFunc(func() {
child.cancel(false, parent.Err(), Cause(parent))
})
c.Context = stopCtx{
Context: parent,
stop: stop,
}
c.mu.Unlock()
return
}
go func() {
select {
case <-parent.Done():
child.cancel(false, parent.Err(), Cause(parent))
case <-child.Done():
}
}()
}
type stringer interface {
String() string
}
func contextName(c Context) string {
if s, ok := c.(stringer); ok {
return s.String()
}
return reflectlite.TypeOf(c).String()
}
func (c *cancelCtx) String() string {
return contextName(c.Context) + ".WithCancel"
}
// cancel closes c.done, cancels each of c's children, and, if
// removeFromParent is true, removes c from its parent's children.
// cancel sets c.cause to cause if this is the first time c is canceled.
func (c *cancelCtx) cancel(removeFromParent bool, err, cause error) {
if err == nil {
panic("context: internal error: missing cancel error")
}
if cause == nil {
cause = err
}
c.mu.Lock()
if c.err != nil {
c.mu.Unlock()
return // already canceled
}
c.err = err
c.cause = cause
d, _ := c.done.Load().(chan struct{})
if d == nil {
c.done.Store(closedchan)
} else {
close(d)
}
for child := range c.children {
// NOTE: acquiring the child's lock while holding parent's lock.
child.cancel(false, err, cause)
}
c.children = nil
c.mu.Unlock()
if removeFromParent {
removeChild(c.Context, c)
}
}
// WithoutCancel returns a copy of parent that is not canceled when parent is canceled.
// The returned context returns no Deadline or Err, and its Done channel is nil.
// Calling [Cause] on the returned context returns nil.
func WithoutCancel(parent Context) Context {
if parent == nil {
panic("cannot create context from nil parent")
}
return withoutCancelCtx{parent}
}
type withoutCancelCtx struct {
c Context
}
func (withoutCancelCtx) Deadline() (deadline time.Time, ok bool) {
return
}
func (withoutCancelCtx) Done() <-chan struct{} {
return nil
}
func (withoutCancelCtx) Err() error {
return nil
}
func (c withoutCancelCtx) Value(key interface{}) interface{} {
return value(c, key)
}
func (c withoutCancelCtx) String() string {
return contextName(c.c) + ".WithoutCancel"
}
// WithDeadline returns a copy of the parent context with the deadline adjusted
// to be no later than d. If the parent's deadline is already earlier than d,
// WithDeadline(parent, d) is semantically equivalent to parent. The returned
// [Context.Done] channel is closed when the deadline expires, when the returned
// cancel function is called, or when the parent context's Done channel is
// closed, whichever happens first.
//
// Canceling this context releases resources associated with it, so code should
// call cancel as soon as the operations running in this [Context] complete.
func WithDeadline(parent Context, d time.Time) (Context, CancelFunc) {
return WithDeadlineCause(parent, d, nil)
}
// WithDeadlineCause behaves like [WithDeadline] but also sets the cause of the
// returned Context when the deadline is exceeded. The returned [CancelFunc] does
// not set the cause.
func WithDeadlineCause(parent Context, d time.Time, cause error) (Context, CancelFunc) {
if parent == nil {
panic("cannot create context from nil parent")
}
if cur, ok := parent.Deadline(); ok && cur.Before(d) {
// The current deadline is already sooner than the new one.
return WithCancel(parent)
}
c := &timerCtx{
deadline: d,
}
c.cancelCtx.propagateCancel(parent, c)
dur := time.Until(d)
if dur <= 0 {
c.cancel(true, DeadlineExceeded, cause) // deadline has already passed
return c, func() { c.cancel(false, Canceled, nil) }
}
c.mu.Lock()
defer c.mu.Unlock()
if c.err == nil {
c.timer = time.AfterFunc(dur, func() {
c.cancel(true, DeadlineExceeded, cause)
})
}
return c, func() { c.cancel(true, Canceled, nil) }
}
// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to
// implement Done and Err. It implements cancel by stopping its timer then
// delegating to cancelCtx.cancel.
type timerCtx struct {
cancelCtx
timer *time.Timer // Under cancelCtx.mu.
deadline time.Time
}
func (c *timerCtx) Deadline() (deadline time.Time, ok bool) {
return c.deadline, true
}
func (c *timerCtx) String() string {
return contextName(c.cancelCtx.Context) + ".WithDeadline(" +
c.deadline.String() + " [" +
time.Until(c.deadline).String() + "])"
}
func (c *timerCtx) cancel(removeFromParent bool, err, cause error) {
c.cancelCtx.cancel(false, err, cause)
if removeFromParent {
// Remove this timerCtx from its parent cancelCtx's children.
removeChild(c.cancelCtx.Context, c)
}
c.mu.Lock()
if c.timer != nil {
c.timer.Stop()
c.timer = nil
}
c.mu.Unlock()
}
// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
//
// Canceling this context releases resources associated with it, so code should
// call cancel as soon as the operations running in this [Context] complete:
//
// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
// defer cancel() // releases resources if slowOperation completes before timeout elapses
// return slowOperation(ctx)
// }
func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
return WithDeadline(parent, time.Now().Add(timeout))
}
// WithTimeoutCause behaves like [WithTimeout] but also sets the cause of the
// returned Context when the timeout expires. The returned [CancelFunc] does
// not set the cause.
func WithTimeoutCause(parent Context, timeout time.Duration, cause error) (Context, CancelFunc) {
return WithDeadlineCause(parent, time.Now().Add(timeout), cause)
}
// WithValue returns a copy of parent in which the value associated with key is
// val.
//
// Use context Values only for request-scoped data that transits processes and
// APIs, not for passing optional parameters to functions.
//
// The provided key must be comparable and should not be of type
// string or any other built-in type to avoid collisions between
// packages using context. Users of WithValue should define their own
// types for keys. To avoid allocating when assigning to an
// interface{}, context keys often have concrete type
// struct{}. Alternatively, exported context key variables' static
// type should be a pointer or interface.
func WithValue(parent Context, key, val interface{}) Context {
if parent == nil {
panic("cannot create context from nil parent")
}
if key == nil {
panic("nil key")
}
if !reflectlite.TypeOf(key).Comparable() {
panic("key is not comparable")
}
return &valueCtx{parent, key, val}
}
// A valueCtx carries a key-value pair. It implements Value for that key and
// delegates all other calls to the embedded Context.
type valueCtx struct {
Context
key, val interface{}
}
// stringify tries a bit to stringify v, without using fmt, since we don't
// want context depending on the unicode tables. This is only used by
// *valueCtx.String().
func stringify(v interface{}) string {
switch s := v.(type) {
case stringer:
return s.String()
case string:
return s
}
return "<not Stringer>"
}
func (c *valueCtx) String() string {
return contextName(c.Context) + ".WithValue(type " +
reflectlite.TypeOf(c.key).String() +
", val " + stringify(c.val) + ")"
}
func (c *valueCtx) Value(key interface{}) interface{} {
if c.key == key {
return c.val
}
return value(c.Context, key)
}
func value(c Context, key interface{}) interface{} {
for {
switch ctx := c.(type) {
case *valueCtx:
if key == ctx.key {
return ctx.val
}
c = ctx.Context
case *cancelCtx:
if key == &cancelCtxKey {
return c
}
c = ctx.Context
case withoutCancelCtx:
if key == &cancelCtxKey {
// This implements Cause(ctx) == nil
// when ctx is created using WithoutCancel.
return nil
}
c = ctx.c
case *timerCtx:
if key == &cancelCtxKey {
return &ctx.cancelCtx
}
c = ctx.Context
case backgroundCtx, todoCtx:
return nil
default:
return c.Value(key)
}
}
}

View file

@ -1,52 +0,0 @@
// package ctxt implements context merging.
package ctxt
import (
"context"
"time"
)
type mergeContext struct {
context.Context
ctx2 context.Context
}
// Merge returns a context that is cancelled when at least one of the parents
// is cancelled. The returned context also returns the values of ctx1, or ctx2
// if nil.
func Merge(ctx1, ctx2 context.Context) (context.Context, context.CancelFunc) {
ctx, cancel := WithCancelCause(ctx1)
stop := AfterFunc(ctx2, func() {
cancel(Cause(ctx2))
})
return &mergeContext{
Context: ctx,
ctx2: ctx2,
}, func() {
stop()
cancel(context.Canceled)
}
}
// Value returns ctx2's value if ctx's is nil.
func (ctx *mergeContext) Value(key interface{}) interface{} {
if v := ctx.Context.Value(key); v != nil {
return v
}
return ctx.ctx2.Value(key)
}
// Deadline returns the earlier deadline of the two parents of ctx.
func (ctx *mergeContext) Deadline() (time.Time, bool) {
if d1, ok := ctx.Context.Deadline(); ok {
if d2, ok := ctx.ctx2.Deadline(); ok {
if d1.Before(d2) {
return d1, true
}
return d2, true
}
return d1, ok
}
return ctx.ctx2.Deadline()
}

View file

@ -1,7 +1,6 @@
package openstack
import (
"context"
"fmt"
"reflect"
"strings"
@ -24,18 +23,20 @@ const (
v3 = "v3"
)
// NewClient prepares an unauthenticated ProviderClient instance.
// Most users will probably prefer using the AuthenticatedClient function
// instead.
//
// This is useful if you wish to explicitly control the version of the identity
// service that's used for authentication explicitly, for example.
//
// A basic example of using this would be:
//
// ao, err := openstack.AuthOptionsFromEnv()
// provider, err := openstack.NewClient(ao.IdentityEndpoint)
// client, err := openstack.NewIdentityV3(provider, gophercloud.EndpointOpts{})
/*
NewClient prepares an unauthenticated ProviderClient instance.
Most users will probably prefer using the AuthenticatedClient function
instead.
This is useful if you wish to explicitly control the version of the identity
service that's used for authentication explicitly, for example.
A basic example of using this would be:
ao, err := openstack.AuthOptionsFromEnv()
provider, err := openstack.NewClient(ao.IdentityEndpoint)
client, err := openstack.NewIdentityV3(provider, gophercloud.EndpointOpts{})
*/
func NewClient(endpoint string) (*gophercloud.ProviderClient, error) {
base, err := utils.BaseEndpoint(endpoint)
if err != nil {
@ -53,45 +54,42 @@ func NewClient(endpoint string) (*gophercloud.ProviderClient, error) {
return p, nil
}
// AuthenticatedClientWithContext logs in to an OpenStack cloud found at the identity endpoint
// specified by the options, acquires a token, and returns a Provider Client
// instance that's ready to operate.
//
// If the full path to a versioned identity endpoint was specified (example:
// http://example.com:5000/v3), that path will be used as the endpoint to query.
//
// If a versionless endpoint was specified (example: http://example.com:5000/),
// the endpoint will be queried to determine which versions of the identity service
// are available, then chooses the most recent or most supported version.
//
// Example:
//
// ao, err := openstack.AuthOptionsFromEnv()
// provider, err := openstack.AuthenticatedClientWithContext(ctx, ao)
// client, err := openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{
// Region: os.Getenv("OS_REGION_NAME"),
// })
func AuthenticatedClientWithContext(ctx context.Context, options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error) {
/*
AuthenticatedClient logs in to an OpenStack cloud found at the identity endpoint
specified by the options, acquires a token, and returns a Provider Client
instance that's ready to operate.
If the full path to a versioned identity endpoint was specified (example:
http://example.com:5000/v3), that path will be used as the endpoint to query.
If a versionless endpoint was specified (example: http://example.com:5000/),
the endpoint will be queried to determine which versions of the identity service
are available, then chooses the most recent or most supported version.
Example:
ao, err := openstack.AuthOptionsFromEnv()
provider, err := openstack.AuthenticatedClient(ao)
client, err := openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{
Region: os.Getenv("OS_REGION_NAME"),
})
*/
func AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error) {
client, err := NewClient(options.IdentityEndpoint)
if err != nil {
return nil, err
}
err = AuthenticateWithContext(ctx, client, options)
err = Authenticate(client, options)
if err != nil {
return nil, err
}
return client, nil
}
// AuthenticatedClient is a compatibility wrapper around AuthenticatedClientWithContext
func AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error) {
return AuthenticatedClientWithContext(context.Background(), options)
}
// AuthenticateWithContext authenticates or re-authenticates against the most
// recent identity service supported at the provided endpoint.
func AuthenticateWithContext(ctx context.Context, client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error {
// Authenticate or re-authenticate against the most recent identity service
// supported at the provided endpoint.
func Authenticate(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error {
versions := []*utils.Version{
{ID: v2, Priority: 20, Suffix: "/v2.0/"},
{ID: v3, Priority: 30, Suffix: "/v3/"},
@ -104,31 +102,21 @@ func AuthenticateWithContext(ctx context.Context, client *gophercloud.ProviderCl
switch chosen.ID {
case v2:
return v2auth(ctx, client, endpoint, options, gophercloud.EndpointOpts{})
return v2auth(client, endpoint, options, gophercloud.EndpointOpts{})
case v3:
return v3auth(ctx, client, endpoint, &options, gophercloud.EndpointOpts{})
return v3auth(client, endpoint, &options, gophercloud.EndpointOpts{})
default:
// The switch statement must be out of date from the versions list.
return fmt.Errorf("Unrecognized identity version: %s", chosen.ID)
}
}
// Authenticate is a compatibility wrapper around AuthenticateWithContext.
func Authenticate(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error {
return AuthenticateWithContext(context.Background(), client, options)
}
// AuthenticateV2WithContext explicitly authenticates against the identity v2 endpoint.
func AuthenticateV2WithContext(ctx context.Context, client *gophercloud.ProviderClient, options gophercloud.AuthOptions, eo gophercloud.EndpointOpts) error {
return v2auth(ctx, client, "", options, eo)
}
// AuthenticateV2 is a compatibility wrapper around AuthenticateV2WithContext.
// AuthenticateV2 explicitly authenticates against the identity v2 endpoint.
func AuthenticateV2(client *gophercloud.ProviderClient, options gophercloud.AuthOptions, eo gophercloud.EndpointOpts) error {
return AuthenticateV2WithContext(context.Background(), client, options, eo)
return v2auth(client, "", options, eo)
}
func v2auth(ctx context.Context, client *gophercloud.ProviderClient, endpoint string, options gophercloud.AuthOptions, eo gophercloud.EndpointOpts) error {
func v2auth(client *gophercloud.ProviderClient, endpoint string, options gophercloud.AuthOptions, eo gophercloud.EndpointOpts) error {
v2Client, err := NewIdentityV2(client, eo)
if err != nil {
return err
@ -148,7 +136,7 @@ func v2auth(ctx context.Context, client *gophercloud.ProviderClient, endpoint st
TokenID: options.TokenID,
}
result := tokens2.CreateWithContext(ctx, v2Client, v2Opts)
result := tokens2.Create(v2Client, v2Opts)
err = client.SetTokenAndAuthResult(result)
if err != nil {
@ -171,7 +159,7 @@ func v2auth(ctx context.Context, client *gophercloud.ProviderClient, endpoint st
tao := options
tao.AllowReauth = false
client.ReauthFunc = func() error {
err := v2auth(context.Background(), &tac, endpoint, tao, eo)
err := v2auth(&tac, endpoint, tao, eo)
if err != nil {
return err
}
@ -186,17 +174,12 @@ func v2auth(ctx context.Context, client *gophercloud.ProviderClient, endpoint st
return nil
}
// AuthenticateV3WithContext explicitly authenticates against the identity v3 service.
func AuthenticateV3WithContext(ctx context.Context, client *gophercloud.ProviderClient, options tokens3.AuthOptionsBuilder, eo gophercloud.EndpointOpts) error {
return v3auth(ctx, client, "", options, eo)
}
// AuthenticateV3 is a compatibility wrapper around AuthenticateV3WithContext
// AuthenticateV3 explicitly authenticates against the identity v3 service.
func AuthenticateV3(client *gophercloud.ProviderClient, options tokens3.AuthOptionsBuilder, eo gophercloud.EndpointOpts) error {
return AuthenticateV3WithContext(context.Background(), client, options, eo)
return v3auth(client, "", options, eo)
}
func v3auth(ctx context.Context, client *gophercloud.ProviderClient, endpoint string, opts tokens3.AuthOptionsBuilder, eo gophercloud.EndpointOpts) error {
func v3auth(client *gophercloud.ProviderClient, endpoint string, opts tokens3.AuthOptionsBuilder, eo gophercloud.EndpointOpts) error {
// Override the generated service endpoint with the one returned by the version endpoint.
v3Client, err := NewIdentityV3(client, eo)
if err != nil {
@ -246,11 +229,11 @@ func v3auth(ctx context.Context, client *gophercloud.ProviderClient, endpoint st
var result tokens3.CreateResult
switch opts.(type) {
case *ec2tokens.AuthOptions:
result = ec2tokens.CreateWithContext(ctx, v3Client, opts)
result = ec2tokens.Create(v3Client, opts)
case *oauth1.AuthOptions:
result = oauth1.CreateWithContext(ctx, v3Client, opts)
result = oauth1.Create(v3Client, opts)
default:
result = tokens3.CreateWithContext(ctx, v3Client, opts)
result = tokens3.Create(v3Client, opts)
}
err = client.SetTokenAndAuthResult(result)
@ -294,7 +277,7 @@ func v3auth(ctx context.Context, client *gophercloud.ProviderClient, endpoint st
tao = opts
}
client.ReauthFunc = func() error {
err := v3auth(context.Background(), &tac, endpoint, tao, eo)
err := v3auth(&tac, endpoint, tao, eo)
if err != nil {
return err
}

View file

@ -1,10 +1,6 @@
package tokens
import (
"context"
"github.com/gophercloud/gophercloud"
)
import "github.com/gophercloud/gophercloud"
// PasswordCredentialsV2 represents the required options to authenticate
// with a username and password.
@ -81,17 +77,17 @@ func (opts AuthOptions) ToTokenV2CreateMap() (map[string]interface{}, error) {
return b, nil
}
// CreateWithContext authenticates to the identity service and attempts to acquire a Token.
// Create authenticates to the identity service and attempts to acquire a Token.
// Generally, rather than interact with this call directly, end users should
// call openstack.AuthenticatedClient(), which abstracts all of the gory details
// about navigating service catalogs and such.
func CreateWithContext(ctx context.Context, client *gophercloud.ServiceClient, auth AuthOptionsBuilder) (r CreateResult) {
func Create(client *gophercloud.ServiceClient, auth AuthOptionsBuilder) (r CreateResult) {
b, err := auth.ToTokenV2CreateMap()
if err != nil {
r.Err = err
return
}
resp, err := client.PostWithContext(ctx, CreateURL(client), b, &r.Body, &gophercloud.RequestOpts{
resp, err := client.Post(CreateURL(client), b, &r.Body, &gophercloud.RequestOpts{
OkCodes: []int{200, 203},
OmitHeaders: []string{"X-Auth-Token"},
})
@ -99,21 +95,11 @@ func CreateWithContext(ctx context.Context, client *gophercloud.ServiceClient, a
return
}
// Create is a compatibility wrapper around CreateWithContext
func Create(client *gophercloud.ServiceClient, auth AuthOptionsBuilder) (r CreateResult) {
return CreateWithContext(context.Background(), client, auth)
}
// GetWithContext validates and retrieves information for user's token.
func GetWithContext(ctx context.Context, client *gophercloud.ServiceClient, token string) (r GetResult) {
// Get validates and retrieves information for user's token.
func Get(client *gophercloud.ServiceClient, token string) (r GetResult) {
resp, err := client.Get(GetURL(client, token), &r.Body, &gophercloud.RequestOpts{
OkCodes: []int{200, 203},
})
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// Get is a compatibility wrapper around GetWithContext
func Get(client *gophercloud.ServiceClient, token string) (r GetResult) {
return GetWithContext(context.Background(), client, token)
}

View file

@ -1,7 +1,6 @@
package ec2tokens
import (
"context"
"crypto/hmac"
"crypto/sha1"
"crypto/sha256"
@ -288,8 +287,8 @@ func (opts *AuthOptions) ToTokenV3CreateMap(map[string]interface{}) (map[string]
return b, nil
}
// CreateWithContext authenticates and either generates a new token from EC2 credentials
func CreateWithContext(ctx context.Context, c *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
// Create authenticates and either generates a new token from EC2 credentials
func Create(c *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
b, err := opts.ToTokenV3CreateMap(nil)
if err != nil {
r.Err = err
@ -299,7 +298,7 @@ func CreateWithContext(ctx context.Context, c *gophercloud.ServiceClient, opts t
// delete "token" element, since it is used in s3tokens
deleteBodyElements(b, "token")
resp, err := c.PostWithContext(ctx, ec2tokensURL(c), b, &r.Body, &gophercloud.RequestOpts{
resp, err := c.Post(ec2tokensURL(c), b, &r.Body, &gophercloud.RequestOpts{
MoreHeaders: map[string]string{"X-Auth-Token": ""},
OkCodes: []int{200},
})
@ -307,15 +306,9 @@ func CreateWithContext(ctx context.Context, c *gophercloud.ServiceClient, opts t
return
}
// Create is a compatibility wrapper around CreateWithContext
func Create(c *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
return CreateWithContext(context.Background(), c, opts)
}
// ValidateS3TokenWithContext authenticates an S3 request using EC2
// credentials. Doesn't generate a new token ID, but returns a
// tokens.CreateResult.
func ValidateS3TokenWithContext(ctx context.Context, c *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
// ValidateS3Token authenticates an S3 request using EC2 credentials. Doesn't
// generate a new token ID, but returns a tokens.CreateResult.
func ValidateS3Token(c *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
b, err := opts.ToTokenV3CreateMap(nil)
if err != nil {
r.Err = err
@ -325,7 +318,7 @@ func ValidateS3TokenWithContext(ctx context.Context, c *gophercloud.ServiceClien
// delete unused element, since it is used in ec2tokens only
deleteBodyElements(b, "body_hash", "headers", "host", "params", "path", "verb")
resp, err := c.PostWithContext(ctx, s3tokensURL(c), b, &r.Body, &gophercloud.RequestOpts{
resp, err := c.Post(s3tokensURL(c), b, &r.Body, &gophercloud.RequestOpts{
MoreHeaders: map[string]string{"X-Auth-Token": ""},
OkCodes: []int{200},
})
@ -333,11 +326,6 @@ func ValidateS3TokenWithContext(ctx context.Context, c *gophercloud.ServiceClien
return
}
// ValidateS3Token is a compatibility wrapper around ValidateS3TokenWithContext
func ValidateS3Token(c *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
return ValidateS3TokenWithContext(context.Background(), c, opts)
}
// The following are small helper functions used to help build the signature.
// sumHMAC1 is a func to implement the HMAC SHA1 signature method.

View file

@ -1,7 +1,6 @@
package oauth1
import (
"context"
"crypto/hmac"
"crypto/sha1"
"encoding/base64"
@ -134,9 +133,9 @@ func (opts AuthOptions) ToTokenV3CreateMap(map[string]interface{}) (map[string]i
return gophercloud.BuildRequestBody(req, "")
}
// CreateWithContext authenticates and either generates a new OpenStack token
// from an OAuth1 token.
func CreateWithContext(ctx context.Context, client *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
// Create authenticates and either generates a new OpenStack token from an
// OAuth1 token.
func Create(client *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
b, err := opts.ToTokenV3CreateMap(nil)
if err != nil {
r.Err = err
@ -154,7 +153,7 @@ func CreateWithContext(ctx context.Context, client *gophercloud.ServiceClient, o
return
}
resp, err := client.PostWithContext(ctx, authURL(client), b, &r.Body, &gophercloud.RequestOpts{
resp, err := client.Post(authURL(client), b, &r.Body, &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{201},
})
@ -162,11 +161,6 @@ func CreateWithContext(ctx context.Context, client *gophercloud.ServiceClient, o
return
}
// Create is a compatibility wrapper around CreateWithContext.
func Create(client *gophercloud.ServiceClient, opts tokens.AuthOptionsBuilder) (r tokens.CreateResult) {
return CreateWithContext(context.Background(), client, opts)
}
// CreateConsumerOptsBuilder allows extensions to add additional parameters to
// the CreateConsumer request.
type CreateConsumerOptsBuilder interface {
@ -184,37 +178,27 @@ func (opts CreateConsumerOpts) ToOAuth1CreateConsumerMap() (map[string]interface
return gophercloud.BuildRequestBody(opts, "consumer")
}
// CreateConsumerWithContext creates a new Consumer.
func CreateConsumerWithContext(ctx context.Context, client *gophercloud.ServiceClient, opts CreateConsumerOptsBuilder) (r CreateConsumerResult) {
// Create creates a new Consumer.
func CreateConsumer(client *gophercloud.ServiceClient, opts CreateConsumerOptsBuilder) (r CreateConsumerResult) {
b, err := opts.ToOAuth1CreateConsumerMap()
if err != nil {
r.Err = err
return
}
resp, err := client.PostWithContext(ctx, consumersURL(client), b, &r.Body, &gophercloud.RequestOpts{
resp, err := client.Post(consumersURL(client), b, &r.Body, &gophercloud.RequestOpts{
OkCodes: []int{201},
})
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// CreateConsumer is a compatibility wrapper around CreateConsumerWithContext.
func CreateConsumer(client *gophercloud.ServiceClient, opts CreateConsumerOptsBuilder) (r CreateConsumerResult) {
return CreateConsumerWithContext(context.Background(), client, opts)
}
// DeleteConsumerWithContext deletes a Consumer.
func DeleteConsumerWithContext(ctx context.Context, client *gophercloud.ServiceClient, id string) (r DeleteConsumerResult) {
resp, err := client.DeleteWithContext(ctx, consumerURL(client, id), nil)
// Delete deletes a Consumer.
func DeleteConsumer(client *gophercloud.ServiceClient, id string) (r DeleteConsumerResult) {
resp, err := client.Delete(consumerURL(client, id), nil)
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// DeleteConsumer is a compatibility wrapper around DeleteConsumerWithContext.
func DeleteConsumer(client *gophercloud.ServiceClient, id string) (r DeleteConsumerResult) {
return DeleteConsumerWithContext(context.Background(), client, id)
}
// List enumerates Consumers.
func ListConsumers(client *gophercloud.ServiceClient) pagination.Pager {
return pagination.NewPager(client, consumersURL(client), func(r pagination.PageResult) pagination.Page {
@ -222,18 +206,13 @@ func ListConsumers(client *gophercloud.ServiceClient) pagination.Pager {
})
}
// GetConsumerWithContext retrieves details on a single Consumer by ID.
func GetConsumerWithContext(ctx context.Context, client *gophercloud.ServiceClient, id string) (r GetConsumerResult) {
resp, err := client.GetWithContext(ctx, consumerURL(client, id), &r.Body, nil)
// GetConsumer retrieves details on a single Consumer by ID.
func GetConsumer(client *gophercloud.ServiceClient, id string) (r GetConsumerResult) {
resp, err := client.Get(consumerURL(client, id), &r.Body, nil)
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// GetConsumer is a compatibility wrapper around GetConsumerWithContext.
func GetConsumer(client *gophercloud.ServiceClient, id string) (r GetConsumerResult) {
return GetConsumerWithContext(context.Background(), client, id)
}
// UpdateConsumerOpts provides options used to update a consumer.
type UpdateConsumerOpts struct {
// Description is the consumer description.
@ -246,25 +225,20 @@ func (opts UpdateConsumerOpts) ToOAuth1UpdateConsumerMap() (map[string]interface
return gophercloud.BuildRequestBody(opts, "consumer")
}
// UpdateConsumerWithContext updates an existing Consumer.
func UpdateConsumerWithContext(ctx context.Context, client *gophercloud.ServiceClient, id string, opts UpdateConsumerOpts) (r UpdateConsumerResult) {
// UpdateConsumer updates an existing Consumer.
func UpdateConsumer(client *gophercloud.ServiceClient, id string, opts UpdateConsumerOpts) (r UpdateConsumerResult) {
b, err := opts.ToOAuth1UpdateConsumerMap()
if err != nil {
r.Err = err
return
}
resp, err := client.PatchWithContext(ctx, consumerURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
resp, err := client.Patch(consumerURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
OkCodes: []int{200},
})
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// UpdateConsumer is a compatibility wrapper around UpdateConsumerWithContext.
func UpdateConsumer(client *gophercloud.ServiceClient, id string, opts UpdateConsumerOpts) (r UpdateConsumerResult) {
return UpdateConsumerWithContext(context.Background(), client, id, opts)
}
// RequestTokenOptsBuilder allows extensions to add additional parameters to the
// RequestToken request.
type RequestTokenOptsBuilder interface {
@ -323,15 +297,15 @@ func (opts RequestTokenOpts) ToOAuth1RequestTokenHeaders(method, u string) (map[
return h, nil
}
// RequestTokenWithContext requests an unauthorized OAuth1 Token.
func RequestTokenWithContext(ctx context.Context, client *gophercloud.ServiceClient, opts RequestTokenOptsBuilder) (r TokenResult) {
// RequestToken requests an unauthorized OAuth1 Token.
func RequestToken(client *gophercloud.ServiceClient, opts RequestTokenOptsBuilder) (r TokenResult) {
h, err := opts.ToOAuth1RequestTokenHeaders("POST", requestTokenURL(client))
if err != nil {
r.Err = err
return
}
resp, err := client.PostWithContext(ctx, requestTokenURL(client), nil, nil, &gophercloud.RequestOpts{
resp, err := client.Post(requestTokenURL(client), nil, nil, &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{201},
KeepResponseBody: true,
@ -349,11 +323,6 @@ func RequestTokenWithContext(ctx context.Context, client *gophercloud.ServiceCli
return
}
// RequestToken is a compatibility wrapper around RequestTokenWithContext.
func RequestToken(client *gophercloud.ServiceClient, opts RequestTokenOptsBuilder) (r TokenResult) {
return RequestTokenWithContext(context.Background(), client, opts)
}
// AuthorizeTokenOptsBuilder allows extensions to add additional parameters to
// the AuthorizeToken request.
type AuthorizeTokenOptsBuilder interface {
@ -382,25 +351,20 @@ func (opts AuthorizeTokenOpts) ToOAuth1AuthorizeTokenMap() (map[string]interface
return gophercloud.BuildRequestBody(opts, "")
}
// AuthorizeTokenWithContext authorizes an unauthorized consumer token.
func AuthorizeTokenWithContext(ctx context.Context, client *gophercloud.ServiceClient, id string, opts AuthorizeTokenOptsBuilder) (r AuthorizeTokenResult) {
// AuthorizeToken authorizes an unauthorized consumer token.
func AuthorizeToken(client *gophercloud.ServiceClient, id string, opts AuthorizeTokenOptsBuilder) (r AuthorizeTokenResult) {
b, err := opts.ToOAuth1AuthorizeTokenMap()
if err != nil {
r.Err = err
return
}
resp, err := client.PutWithContext(ctx, authorizeTokenURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
resp, err := client.Put(authorizeTokenURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
OkCodes: []int{200},
})
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// AuthorizeToken is a compatibility wrapper around AuthorizeTokenWithContext.
func AuthorizeToken(client *gophercloud.ServiceClient, id string, opts AuthorizeTokenOptsBuilder) (r AuthorizeTokenResult) {
return AuthorizeTokenWithContext(context.Background(), client, id, opts)
}
// CreateAccessTokenOptsBuilder allows extensions to add additional parameters
// to the CreateAccessToken request.
type CreateAccessTokenOptsBuilder interface {
@ -461,15 +425,15 @@ func (opts CreateAccessTokenOpts) ToOAuth1CreateAccessTokenHeaders(method, u str
return headers, nil
}
// CreateAccessTokenWithContext creates a new OAuth1 Access Token
func CreateAccessTokenWithContext(ctx context.Context, client *gophercloud.ServiceClient, opts CreateAccessTokenOptsBuilder) (r TokenResult) {
// CreateAccessToken creates a new OAuth1 Access Token
func CreateAccessToken(client *gophercloud.ServiceClient, opts CreateAccessTokenOptsBuilder) (r TokenResult) {
h, err := opts.ToOAuth1CreateAccessTokenHeaders("POST", createAccessTokenURL(client))
if err != nil {
r.Err = err
return
}
resp, err := client.PostWithContext(ctx, createAccessTokenURL(client), nil, nil, &gophercloud.RequestOpts{
resp, err := client.Post(createAccessTokenURL(client), nil, nil, &gophercloud.RequestOpts{
MoreHeaders: h,
OkCodes: []int{201},
KeepResponseBody: true,
@ -487,33 +451,18 @@ func CreateAccessTokenWithContext(ctx context.Context, client *gophercloud.Servi
return
}
// CreateAccessToken is a compatibility wrapper around CreateAccessTokenWithContext.
func CreateAccessToken(client *gophercloud.ServiceClient, opts CreateAccessTokenOptsBuilder) (r TokenResult) {
return CreateAccessTokenWithContext(context.Background(), client, opts)
}
// GetAccessTokenWithContext retrieves details on a single OAuth1 access token by an ID.
func GetAccessTokenWithContext(ctx context.Context, client *gophercloud.ServiceClient, userID string, id string) (r GetAccessTokenResult) {
resp, err := client.GetWithContext(ctx, userAccessTokenURL(client, userID, id), &r.Body, nil)
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// GetAccessToken is a compatibility wrapper around GetAccessTokenWithContext.
// GetAccessToken retrieves details on a single OAuth1 access token by an ID.
func GetAccessToken(client *gophercloud.ServiceClient, userID string, id string) (r GetAccessTokenResult) {
return GetAccessTokenWithContext(context.Background(), client, userID, id)
}
// RevokeAccessTokenWithContext revokes an OAuth1 access token.
func RevokeAccessTokenWithContext(ctx context.Context, client *gophercloud.ServiceClient, userID string, id string) (r RevokeAccessTokenResult) {
resp, err := client.DeleteWithContext(ctx, userAccessTokenURL(client, userID, id), nil)
resp, err := client.Get(userAccessTokenURL(client, userID, id), &r.Body, nil)
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// RevokeAccessToken is a compatibility wrapper around RevokeAccessTokenWithContext.
// RevokeAccessToken revokes an OAuth1 access token.
func RevokeAccessToken(client *gophercloud.ServiceClient, userID string, id string) (r RevokeAccessTokenResult) {
return RevokeAccessTokenWithContext(context.Background(), client, userID, id)
resp, err := client.Delete(userAccessTokenURL(client, userID, id), nil)
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// ListAccessTokens enumerates authorized access tokens.
@ -532,19 +481,14 @@ func ListAccessTokenRoles(client *gophercloud.ServiceClient, userID string, id s
})
}
// GetAccessTokenRoleWithContext retrieves details on a single OAuth1 access token role by
// GetAccessTokenRole retrieves details on a single OAuth1 access token role by
// an ID.
func GetAccessTokenRoleWithContext(ctx context.Context, client *gophercloud.ServiceClient, userID string, id string, roleID string) (r GetAccessTokenRoleResult) {
resp, err := client.GetWithContext(ctx, userAccessTokenRoleURL(client, userID, id, roleID), &r.Body, nil)
func GetAccessTokenRole(client *gophercloud.ServiceClient, userID string, id string, roleID string) (r GetAccessTokenRoleResult) {
resp, err := client.Get(userAccessTokenRoleURL(client, userID, id, roleID), &r.Body, nil)
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// GetAccessTokenRole is a compatibility wrapper around GetAccessTokenRoleWithContext.
func GetAccessTokenRole(client *gophercloud.ServiceClient, userID string, id string, roleID string) (r GetAccessTokenRoleResult) {
return GetAccessTokenRoleWithContext(context.Background(), client, userID, id, roleID)
}
// The following are small helper functions used to help build the signature.
// buildOAuth1QueryString builds a URLEncoded parameters string specific for

View file

@ -1,10 +1,6 @@
package tokens
import (
"context"
"github.com/gophercloud/gophercloud"
)
import "github.com/gophercloud/gophercloud"
// Scope allows a created token to be limited to a specific domain or project.
type Scope struct {
@ -123,9 +119,9 @@ func subjectTokenHeaders(subjectToken string) map[string]string {
}
}
// CreateWithContext authenticates and either generates a new token, or changes the Scope
// Create authenticates and either generates a new token, or changes the Scope
// of an existing token.
func CreateWithContext(ctx context.Context, c *gophercloud.ServiceClient, opts AuthOptionsBuilder) (r CreateResult) {
func Create(c *gophercloud.ServiceClient, opts AuthOptionsBuilder) (r CreateResult) {
scope, err := opts.ToTokenV3ScopeMap()
if err != nil {
r.Err = err
@ -138,21 +134,16 @@ func CreateWithContext(ctx context.Context, c *gophercloud.ServiceClient, opts A
return
}
resp, err := c.PostWithContext(ctx, tokenURL(c), b, &r.Body, &gophercloud.RequestOpts{
resp, err := c.Post(tokenURL(c), b, &r.Body, &gophercloud.RequestOpts{
OmitHeaders: []string{"X-Auth-Token"},
})
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// Create is a compatibility wrapper around CreateWithContext
func Create(c *gophercloud.ServiceClient, opts AuthOptionsBuilder) (r CreateResult) {
return CreateWithContext(context.Background(), c, opts)
}
// GetGetWithContext validates and retrieves information about another token.
func GetWithContext(ctx context.Context, c *gophercloud.ServiceClient, token string) (r GetResult) {
resp, err := c.GetWithContext(ctx, tokenURL(c), &r.Body, &gophercloud.RequestOpts{
// Get validates and retrieves information about another token.
func Get(c *gophercloud.ServiceClient, token string) (r GetResult) {
resp, err := c.Get(tokenURL(c), &r.Body, &gophercloud.RequestOpts{
MoreHeaders: subjectTokenHeaders(token),
OkCodes: []int{200, 203},
})
@ -160,14 +151,9 @@ func GetWithContext(ctx context.Context, c *gophercloud.ServiceClient, token str
return
}
// Get is a compatibility wrapper around GetWithContext
func Get(c *gophercloud.ServiceClient, token string) (r GetResult) {
return GetWithContext(context.Background(), c, token)
}
// ValidateWithContext determines if a specified token is valid or not.
func ValidateWithContext(ctx context.Context, c *gophercloud.ServiceClient, token string) (bool, error) {
resp, err := c.HeadWithContext(ctx, tokenURL(c), &gophercloud.RequestOpts{
// Validate determines if a specified token is valid or not.
func Validate(c *gophercloud.ServiceClient, token string) (bool, error) {
resp, err := c.Head(tokenURL(c), &gophercloud.RequestOpts{
MoreHeaders: subjectTokenHeaders(token),
OkCodes: []int{200, 204, 404},
})
@ -178,21 +164,11 @@ func ValidateWithContext(ctx context.Context, c *gophercloud.ServiceClient, toke
return resp.StatusCode == 200 || resp.StatusCode == 204, nil
}
// Validate is a compatibility wrapper around ValidateWithContext
func Validate(c *gophercloud.ServiceClient, token string) (bool, error) {
return ValidateWithContext(context.Background(), c, token)
}
// RevokeWithContext immediately makes specified token invalid.
func RevokeWithContext(ctx context.Context, c *gophercloud.ServiceClient, token string) (r RevokeResult) {
resp, err := c.DeleteWithContext(ctx, tokenURL(c), &gophercloud.RequestOpts{
// Revoke immediately makes specified token invalid.
func Revoke(c *gophercloud.ServiceClient, token string) (r RevokeResult) {
resp, err := c.Delete(tokenURL(c), &gophercloud.RequestOpts{
MoreHeaders: subjectTokenHeaders(token),
})
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
// Revoke is a compatibility wrapper around RevokeWithContext
func Revoke(c *gophercloud.ServiceClient, token string) (r RevokeResult) {
return RevokeWithContext(context.Background(), c, token)
}

View file

@ -1,7 +1,6 @@
package pagination
import (
"context"
"encoding/json"
"io/ioutil"
"net/http"
@ -53,16 +52,11 @@ func PageResultFromParsed(resp *http.Response, body interface{}) PageResult {
}
}
// RequestWithContext performs an HTTP request and extracts the http.Response from the result.
func RequestWithContext(ctx context.Context, client *gophercloud.ServiceClient, headers map[string]string, url string) (*http.Response, error) {
return client.GetWithContext(ctx, url, nil, &gophercloud.RequestOpts{
// Request performs an HTTP request and extracts the http.Response from the result.
func Request(client *gophercloud.ServiceClient, headers map[string]string, url string) (*http.Response, error) {
return client.Get(url, nil, &gophercloud.RequestOpts{
MoreHeaders: headers,
OkCodes: []int{200, 204, 300},
KeepResponseBody: true,
})
}
// Request is a compatibility wrapper around RequestWithContext.
func Request(client *gophercloud.ServiceClient, headers map[string]string, url string) (*http.Response, error) {
return RequestWithContext(context.Background(), client, headers, url)
}

View file

@ -1,7 +1,6 @@
package pagination
import (
"context"
"errors"
"fmt"
"net/http"
@ -70,8 +69,8 @@ func (p Pager) WithPageCreator(createPage func(r PageResult) Page) Pager {
}
}
func (p Pager) fetchNextPage(ctx context.Context, url string) (Page, error) {
resp, err := RequestWithContext(ctx, p.client, p.Headers, url)
func (p Pager) fetchNextPage(url string) (Page, error) {
resp, err := Request(p.client, p.Headers, url)
if err != nil {
return nil, err
}
@ -84,10 +83,9 @@ func (p Pager) fetchNextPage(ctx context.Context, url string) (Page, error) {
return p.createPage(remembered), nil
}
// EachPageWithContext iterates over each page returned by a Pager, yielding
// one at a time to a handler function. Return "false" from the handler to
// prematurely stop iterating.
func (p Pager) EachPageWithContext(ctx context.Context, handler func(context.Context, Page) (bool, error)) error {
// EachPage iterates over each page returned by a Pager, yielding one at a time to a handler function.
// Return "false" from the handler to prematurely stop iterating.
func (p Pager) EachPage(handler func(Page) (bool, error)) error {
if p.Err != nil {
return p.Err
}
@ -101,7 +99,7 @@ func (p Pager) EachPageWithContext(ctx context.Context, handler func(context.Con
p.firstPage = nil
} else {
var err error
currentPage, err = p.fetchNextPage(ctx, currentURL)
currentPage, err = p.fetchNextPage(currentURL)
if err != nil {
return err
}
@ -115,7 +113,7 @@ func (p Pager) EachPageWithContext(ctx context.Context, handler func(context.Con
return nil
}
ok, err := handler(ctx, currentPage)
ok, err := handler(currentPage)
if err != nil {
return err
}
@ -133,16 +131,9 @@ func (p Pager) EachPageWithContext(ctx context.Context, handler func(context.Con
}
}
// EachPage is a compatibility wrapper around EachPageWithContext.
func (p Pager) EachPage(handler func(Page) (bool, error)) error {
return p.EachPageWithContext(context.Background(), func(_ context.Context, p Page) (bool, error) {
return handler(p)
})
}
// AllPagesWithContext returns all the pages from a `List` operation in a single page,
// AllPages returns all the pages from a `List` operation in a single page,
// allowing the user to retrieve all the pages at once.
func (p Pager) AllPagesWithContext(ctx context.Context) (Page, error) {
func (p Pager) AllPages() (Page, error) {
if p.Err != nil {
return nil, p.Err
}
@ -152,7 +143,7 @@ func (p Pager) AllPagesWithContext(ctx context.Context) (Page, error) {
var body reflect.Value
// Grab a first page to ascertain the page body type.
firstPage, err := p.fetchNextPage(ctx, p.initialURL)
firstPage, err := p.fetchNextPage(p.initialURL)
if err != nil {
return nil, err
}
@ -261,8 +252,3 @@ func (p Pager) AllPagesWithContext(ctx context.Context) (Page, error) {
// `Extract*` methods will work.
return page.Elem().Interface().(Page), err
}
// AllPages is a compatibility wrapper around AllPagesWithContext.
func (p Pager) AllPages() (Page, error) {
return p.AllPagesWithContext(context.Background())
}

View file

@ -10,13 +10,11 @@ import (
"net/http"
"strings"
"sync"
"github.com/gophercloud/gophercloud/internal/ctxt"
)
// DefaultUserAgent is the default User-Agent string set in the request header.
const (
DefaultUserAgent = "gophercloud/v1.10.0"
DefaultUserAgent = "gophercloud/v1.11.0"
DefaultMaxBackoffRetries = 60
)
@ -90,9 +88,7 @@ type ProviderClient struct {
// with the token and reauth func zeroed. Such client can be used to perform reauthorization.
Throwaway bool
// Context is the context passed to the HTTP request. Values set on the
// per-call context, when available, override values set on this
// context.
// Context is the context passed to the HTTP request.
Context context.Context
// Retry backoff func is called when rate limited.
@ -356,20 +352,15 @@ type requestState struct {
var applicationJSON = "application/json"
// RequestWithContext performs an HTTP request using the ProviderClient's
// current HTTPClient. An authentication header will automatically be provided.
func (client *ProviderClient) RequestWithContext(ctx context.Context, method, url string, options *RequestOpts) (*http.Response, error) {
return client.doRequest(ctx, method, url, options, &requestState{
// Request performs an HTTP request using the ProviderClient's current HTTPClient. An authentication
// header will automatically be provided.
func (client *ProviderClient) Request(method, url string, options *RequestOpts) (*http.Response, error) {
return client.doRequest(method, url, options, &requestState{
hasReauthenticated: false,
})
}
// Request is a compatibility wrapper for Request.
func (client *ProviderClient) Request(method, url string, options *RequestOpts) (*http.Response, error) {
return client.RequestWithContext(context.Background(), method, url, options)
}
func (client *ProviderClient) doRequest(ctx context.Context, method, url string, options *RequestOpts, state *requestState) (*http.Response, error) {
func (client *ProviderClient) doRequest(method, url string, options *RequestOpts, state *requestState) (*http.Response, error) {
var body io.Reader
var contentType *string
@ -398,16 +389,14 @@ func (client *ProviderClient) doRequest(ctx context.Context, method, url string,
body = options.RawBody
}
if client.Context != nil {
var cancel context.CancelFunc
ctx, cancel = ctxt.Merge(ctx, client.Context)
defer cancel()
}
req, err := http.NewRequestWithContext(ctx, method, url, body)
// Construct the http.Request.
req, err := http.NewRequest(method, url, body)
if err != nil {
return nil, err
}
if client.Context != nil {
req = req.WithContext(client.Context)
}
// Populate the request headers.
// Apply options.MoreHeaders and options.OmitHeaders, to give the caller the chance to
@ -443,12 +432,12 @@ func (client *ProviderClient) doRequest(ctx context.Context, method, url string,
if client.RetryFunc != nil {
var e error
state.retries = state.retries + 1
e = client.RetryFunc(ctx, method, url, options, err, state.retries)
e = client.RetryFunc(client.Context, method, url, options, err, state.retries)
if e != nil {
return nil, e
}
return client.doRequest(ctx, method, url, options, state)
return client.doRequest(method, url, options, state)
}
return nil, err
}
@ -502,7 +491,7 @@ func (client *ProviderClient) doRequest(ctx context.Context, method, url string,
}
}
state.hasReauthenticated = true
resp, err = client.doRequest(ctx, method, url, options, state)
resp, err = client.doRequest(method, url, options, state)
if err != nil {
switch err.(type) {
case *ErrUnexpectedResponseCode:
@ -567,7 +556,7 @@ func (client *ProviderClient) doRequest(ctx context.Context, method, url string,
return resp, e
}
return client.doRequest(ctx, method, url, options, state)
return client.doRequest(method, url, options, state)
}
case http.StatusInternalServerError:
err = ErrDefault500{respErr}
@ -603,7 +592,7 @@ func (client *ProviderClient) doRequest(ctx context.Context, method, url string,
return resp, e
}
return client.doRequest(ctx, method, url, options, state)
return client.doRequest(method, url, options, state)
}
return resp, err
@ -627,7 +616,7 @@ func (client *ProviderClient) doRequest(ctx context.Context, method, url string,
return resp, e
}
return client.doRequest(ctx, method, url, options, state)
return client.doRequest(method, url, options, state)
}
return nil, err
}

View file

@ -1,7 +1,6 @@
package gophercloud
import (
"context"
"io"
"net/http"
"strings"
@ -60,88 +59,58 @@ func (client *ServiceClient) initReqOpts(JSONBody interface{}, JSONResponse inte
}
}
// GetWithContext calls `Request` with the "GET" HTTP verb.
func (client *ServiceClient) GetWithContext(ctx context.Context, url string, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
// Get calls `Request` with the "GET" HTTP verb.
func (client *ServiceClient) Get(url string, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
if opts == nil {
opts = new(RequestOpts)
}
client.initReqOpts(nil, JSONResponse, opts)
return client.RequestWithContext(ctx, "GET", url, opts)
return client.Request("GET", url, opts)
}
// Get is a compatibility wrapper for GetWithContext.
func (client *ServiceClient) Get(url string, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
return client.GetWithContext(context.Background(), url, JSONResponse, opts)
}
// PostWithContext calls `Request` with the "POST" HTTP verb.
func (client *ServiceClient) PostWithContext(ctx context.Context, url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
if opts == nil {
opts = new(RequestOpts)
}
client.initReqOpts(JSONBody, JSONResponse, opts)
return client.RequestWithContext(ctx, "POST", url, opts)
}
// Post is a compatibility wrapper for PostWithContext.
// Post calls `Request` with the "POST" HTTP verb.
func (client *ServiceClient) Post(url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
return client.PostWithContext(context.Background(), url, JSONBody, JSONResponse, opts)
}
// PutWithContext calls `Request` with the "PUT" HTTP verb.
func (client *ServiceClient) PutWithContext(ctx context.Context, url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
if opts == nil {
opts = new(RequestOpts)
}
client.initReqOpts(JSONBody, JSONResponse, opts)
return client.RequestWithContext(ctx, "PUT", url, opts)
return client.Request("POST", url, opts)
}
// Put is a compatibility wrapper for PurWithContext.
// Put calls `Request` with the "PUT" HTTP verb.
func (client *ServiceClient) Put(url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
return client.PutWithContext(context.Background(), url, JSONBody, JSONResponse, opts)
}
// PatchWithContext calls `Request` with the "PATCH" HTTP verb.
func (client *ServiceClient) PatchWithContext(ctx context.Context, url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
if opts == nil {
opts = new(RequestOpts)
}
client.initReqOpts(JSONBody, JSONResponse, opts)
return client.RequestWithContext(ctx, "PATCH", url, opts)
return client.Request("PUT", url, opts)
}
// Patch is a compatibility wrapper for PatchWithContext.
// Patch calls `Request` with the "PATCH" HTTP verb.
func (client *ServiceClient) Patch(url string, JSONBody interface{}, JSONResponse interface{}, opts *RequestOpts) (*http.Response, error) {
return client.PatchWithContext(context.Background(), url, JSONBody, JSONResponse, opts)
}
// DeleteWithContext calls `Request` with the "DELETE" HTTP verb.
func (client *ServiceClient) DeleteWithContext(ctx context.Context, url string, opts *RequestOpts) (*http.Response, error) {
if opts == nil {
opts = new(RequestOpts)
}
client.initReqOpts(nil, nil, opts)
return client.RequestWithContext(ctx, "DELETE", url, opts)
client.initReqOpts(JSONBody, JSONResponse, opts)
return client.Request("PATCH", url, opts)
}
// Delete is a compatibility wrapper for DeleteWithContext.
// Delete calls `Request` with the "DELETE" HTTP verb.
func (client *ServiceClient) Delete(url string, opts *RequestOpts) (*http.Response, error) {
return client.DeleteWithContext(context.Background(), url, opts)
}
// HeadWithContext calls `Request` with the "HEAD" HTTP verb.
func (client *ServiceClient) HeadWithContext(ctx context.Context, url string, opts *RequestOpts) (*http.Response, error) {
if opts == nil {
opts = new(RequestOpts)
}
client.initReqOpts(nil, nil, opts)
return client.RequestWithContext(ctx, "HEAD", url, opts)
return client.Request("DELETE", url, opts)
}
// Head is a compatibility wrapper for HeadWithContext.
// Head calls `Request` with the "HEAD" HTTP verb.
func (client *ServiceClient) Head(url string, opts *RequestOpts) (*http.Response, error) {
return client.HeadWithContext(context.Background(), url, opts)
if opts == nil {
opts = new(RequestOpts)
}
client.initReqOpts(nil, nil, opts)
return client.Request("HEAD", url, opts)
}
func (client *ServiceClient) setMicroversionHeader(opts *RequestOpts) {
@ -164,7 +133,7 @@ func (client *ServiceClient) setMicroversionHeader(opts *RequestOpts) {
}
// Request carries out the HTTP operation for the service client
func (client *ServiceClient) RequestWithContext(ctx context.Context, method, url string, options *RequestOpts) (*http.Response, error) {
func (client *ServiceClient) Request(method, url string, options *RequestOpts) (*http.Response, error) {
if options.MoreHeaders == nil {
options.MoreHeaders = make(map[string]string)
}
@ -182,12 +151,7 @@ func (client *ServiceClient) RequestWithContext(ctx context.Context, method, url
options.MoreHeaders[k] = v
}
}
return client.ProviderClient.RequestWithContext(ctx, method, url, options)
}
// Request is a compatibility wrapper for RequestWithContext.
func (client *ServiceClient) Request(method, url string, options *RequestOpts) (*http.Response, error) {
return client.RequestWithContext(context.Background(), method, url, options)
return client.ProviderClient.Request(method, url, options)
}
// ParseResponse is a helper function to parse http.Response to constituents.

View file

@ -1,3 +1,19 @@
# 1.14.3 (March 4, 2024)
* Update golang.org/x/crypto and golang.org/x/text
# 1.14.2 (March 4, 2024)
* Fix CVE-2024-27304. SQL injection can occur if an attacker can cause a single query or bind message to exceed 4 GB in
size. An integer overflow in the calculated message size can cause the one large message to be sent as multiple messages
under the attacker's control.
# 1.14.1 (July 19, 2023)
* Fix: Enable failover efforts when pg_hba.conf disallows non-ssl connections (Brandon Kauffman)
* Fix: connect_timeout is not obeyed for sslmode=allow|prefer (smaher-edb)
* Optimize redundant pgpass parsing in case password is explicitly set (Aleksandr Alekseev)
# 1.14.0 (February 11, 2023)
* Fix: each connection attempt to new node gets own timeout (Nathan Giardina)

View file

@ -41,7 +41,11 @@ func (c *PgConn) scramAuth(serverAuthMechanisms []string) error {
AuthMechanism: "SCRAM-SHA-256",
Data: sc.clientFirstMessage(),
}
_, err = c.conn.Write(saslInitialResponse.Encode(nil))
buf, err := saslInitialResponse.Encode(nil)
if err != nil {
return err
}
_, err = c.conn.Write(buf)
if err != nil {
return err
}
@ -60,7 +64,11 @@ func (c *PgConn) scramAuth(serverAuthMechanisms []string) error {
saslResponse := &pgproto3.SASLResponse{
Data: []byte(sc.clientFinalMessage()),
}
_, err = c.conn.Write(saslResponse.Encode(nil))
buf, err = saslResponse.Encode(nil)
if err != nil {
return err
}
_, err = c.conn.Write(buf)
if err != nil {
return err
}

Some files were not shown because too many files have changed in this diff Show more