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:
parent
49566b7ce4
commit
9193f3eebc
285 changed files with 70293 additions and 63914 deletions
9
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
generated
vendored
9
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
generated
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/assets.json
generated
vendored
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/assets.json
generated
vendored
|
|
@ -2,5 +2,5 @@
|
|||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "go",
|
||||
"TagPrefix": "go/azidentity",
|
||||
"Tag": "go/azidentity_db4a26f583"
|
||||
"Tag": "go/azidentity_98074050dc"
|
||||
}
|
||||
|
|
|
|||
3
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
generated
vendored
3
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
generated
vendored
|
|
@ -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
|
||||
|
|
|
|||
6
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work.sum
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work.sum
generated
vendored
|
|
@ -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=
|
||||
|
|
|
|||
18
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
generated
vendored
18
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
generated
vendored
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
generated
vendored
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
generated
vendored
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
125
vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/models.go
generated
vendored
125
vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/models.go
generated
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
122
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
122
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
|
|
@ -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{
|
||||
|
|
|
|||
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
|
|
@ -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"
|
||||
|
|
|
|||
573
vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
generated
vendored
573
vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
generated
vendored
|
|
@ -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 won’t 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,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
12
vendor/github.com/getsentry/sentry-go/CHANGELOG.md
generated
vendored
12
vendor/github.com/getsentry/sentry-go/CHANGELOG.md
generated
vendored
|
|
@ -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.
|
||||
|
|
|
|||
4
vendor/github.com/getsentry/sentry-go/interfaces.go
generated
vendored
4
vendor/github.com/getsentry/sentry-go/interfaces.go
generated
vendored
|
|
@ -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.
|
||||
|
|
|
|||
2
vendor/github.com/getsentry/sentry-go/scope.go
generated
vendored
2
vendor/github.com/getsentry/sentry-go/scope.go
generated
vendored
|
|
@ -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 {
|
||||
|
|
|
|||
2
vendor/github.com/getsentry/sentry-go/sentry.go
generated
vendored
2
vendor/github.com/getsentry/sentry-go/sentry.go
generated
vendored
|
|
@ -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.
|
||||
|
|
|
|||
2
vendor/github.com/getsentry/sentry-go/transport.go
generated
vendored
2
vendor/github.com/getsentry/sentry-go/transport.go
generated
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
4
vendor/github.com/golang-jwt/jwt/v5/ecdsa.go
generated
vendored
4
vendor/github.com/golang-jwt/jwt/v5/ecdsa.go
generated
vendored
|
|
@ -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
|
||||
|
|
|
|||
4
vendor/github.com/golang-jwt/jwt/v5/hmac.go
generated
vendored
4
vendor/github.com/golang-jwt/jwt/v5/hmac.go
generated
vendored
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
10
vendor/github.com/gophercloud/gophercloud/CHANGELOG.md
generated
vendored
10
vendor/github.com/gophercloud/gophercloud/CHANGELOG.md
generated
vendored
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
739
vendor/github.com/gophercloud/gophercloud/internal/ctxt/context.go
generated
vendored
739
vendor/github.com/gophercloud/gophercloud/internal/ctxt/context.go
generated
vendored
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
52
vendor/github.com/gophercloud/gophercloud/internal/ctxt/merge.go
generated
vendored
52
vendor/github.com/gophercloud/gophercloud/internal/ctxt/merge.go
generated
vendored
|
|
@ -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()
|
||||
}
|
||||
123
vendor/github.com/gophercloud/gophercloud/openstack/client.go
generated
vendored
123
vendor/github.com/gophercloud/gophercloud/openstack/client.go
generated
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
26
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tokens/requests.go
generated
vendored
26
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tokens/requests.go
generated
vendored
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
50
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go
generated
vendored
50
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go
generated
vendored
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
12
vendor/github.com/gophercloud/gophercloud/pagination/http.go
generated
vendored
12
vendor/github.com/gophercloud/gophercloud/pagination/http.go
generated
vendored
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
34
vendor/github.com/gophercloud/gophercloud/pagination/pager.go
generated
vendored
34
vendor/github.com/gophercloud/gophercloud/pagination/pager.go
generated
vendored
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
47
vendor/github.com/gophercloud/gophercloud/provider_client.go
generated
vendored
47
vendor/github.com/gophercloud/gophercloud/provider_client.go
generated
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
76
vendor/github.com/gophercloud/gophercloud/service_client.go
generated
vendored
76
vendor/github.com/gophercloud/gophercloud/service_client.go
generated
vendored
|
|
@ -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.
|
||||
|
|
|
|||
16
vendor/github.com/jackc/pgconn/CHANGELOG.md
generated
vendored
16
vendor/github.com/jackc/pgconn/CHANGELOG.md
generated
vendored
|
|
@ -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)
|
||||
|
|
|
|||
12
vendor/github.com/jackc/pgconn/auth_scram.go
generated
vendored
12
vendor/github.com/jackc/pgconn/auth_scram.go
generated
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
6
vendor/github.com/jackc/pgconn/config.go
generated
vendored
6
vendor/github.com/jackc/pgconn/config.go
generated
vendored
|
|
@ -366,9 +366,9 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con
|
|||
config.TLSConfig = fallbacks[0].TLSConfig
|
||||
config.Fallbacks = fallbacks[1:]
|
||||
|
||||
passfile, err := pgpassfile.ReadPassfile(settings["passfile"])
|
||||
if err == nil {
|
||||
if config.Password == "" {
|
||||
if config.Password == "" {
|
||||
passfile, err := pgpassfile.ReadPassfile(settings["passfile"])
|
||||
if err == nil {
|
||||
host := config.Host
|
||||
if network, _ := NetworkAddress(config.Host, config.Port); network == "unix" {
|
||||
host = "localhost"
|
||||
|
|
|
|||
6
vendor/github.com/jackc/pgconn/krb5.go
generated
vendored
6
vendor/github.com/jackc/pgconn/krb5.go
generated
vendored
|
|
@ -62,7 +62,11 @@ func (c *PgConn) gssAuth() error {
|
|||
gssResponse := &pgproto3.GSSResponse{
|
||||
Data: nextData,
|
||||
}
|
||||
_, err = c.conn.Write(gssResponse.Encode(nil))
|
||||
buf, err := gssResponse.Encode(nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = c.conn.Write(buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
189
vendor/github.com/jackc/pgconn/pgconn.go
generated
vendored
189
vendor/github.com/jackc/pgconn/pgconn.go
generated
vendored
|
|
@ -156,12 +156,15 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er
|
|||
|
||||
foundBestServer := false
|
||||
var fallbackConfig *FallbackConfig
|
||||
for _, fc := range fallbackConfigs {
|
||||
for i, fc := range fallbackConfigs {
|
||||
// ConnectTimeout restricts the whole connection process.
|
||||
if config.ConnectTimeout != 0 {
|
||||
var cancel context.CancelFunc
|
||||
ctx, cancel = context.WithTimeout(octx, config.ConnectTimeout)
|
||||
defer cancel()
|
||||
// create new context first time or when previous host was different
|
||||
if i == 0 || (fallbackConfigs[i].Host != fallbackConfigs[i-1].Host) {
|
||||
var cancel context.CancelFunc
|
||||
ctx, cancel = context.WithTimeout(octx, config.ConnectTimeout)
|
||||
defer cancel()
|
||||
}
|
||||
} else {
|
||||
ctx = octx
|
||||
}
|
||||
|
|
@ -176,7 +179,7 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er
|
|||
const ERRCODE_INVALID_CATALOG_NAME = "3D000" // db does not exist
|
||||
const ERRCODE_INSUFFICIENT_PRIVILEGE = "42501" // missing connect privilege
|
||||
if pgerr.Code == ERRCODE_INVALID_PASSWORD ||
|
||||
pgerr.Code == ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION ||
|
||||
pgerr.Code == ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION && fc.TLSConfig != nil ||
|
||||
pgerr.Code == ERRCODE_INVALID_CATALOG_NAME ||
|
||||
pgerr.Code == ERRCODE_INSUFFICIENT_PRIVILEGE {
|
||||
break
|
||||
|
|
@ -311,7 +314,11 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig
|
|||
startupMsg.Parameters["database"] = config.Database
|
||||
}
|
||||
|
||||
if _, err := pgConn.conn.Write(startupMsg.Encode(pgConn.wbuf)); err != nil {
|
||||
buf, err := startupMsg.Encode(pgConn.wbuf)
|
||||
if err != nil {
|
||||
return nil, &connectError{config: config, msg: "failed to write startup message", err: err}
|
||||
}
|
||||
if _, err := pgConn.conn.Write(buf); err != nil {
|
||||
pgConn.conn.Close()
|
||||
return nil, &connectError{config: config, msg: "failed to write startup message", err: err}
|
||||
}
|
||||
|
|
@ -416,7 +423,11 @@ func startTLS(conn net.Conn, tlsConfig *tls.Config) (net.Conn, error) {
|
|||
|
||||
func (pgConn *PgConn) txPasswordMessage(password string) (err error) {
|
||||
msg := &pgproto3.PasswordMessage{Password: password}
|
||||
_, err = pgConn.conn.Write(msg.Encode(pgConn.wbuf))
|
||||
buf, err := msg.Encode(pgConn.wbuf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = pgConn.conn.Write(buf)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -599,9 +610,10 @@ func (pgConn *PgConn) PID() uint32 {
|
|||
// TxStatus returns the current TxStatus as reported by the server in the ReadyForQuery message.
|
||||
//
|
||||
// Possible return values:
|
||||
// 'I' - idle / not in transaction
|
||||
// 'T' - in a transaction
|
||||
// 'E' - in a failed transaction
|
||||
//
|
||||
// 'I' - idle / not in transaction
|
||||
// 'T' - in a transaction
|
||||
// 'E' - in a failed transaction
|
||||
//
|
||||
// See https://www.postgresql.org/docs/current/protocol-message-formats.html.
|
||||
func (pgConn *PgConn) TxStatus() byte {
|
||||
|
|
@ -828,9 +840,19 @@ func (pgConn *PgConn) Prepare(ctx context.Context, name, sql string, paramOIDs [
|
|||
}
|
||||
|
||||
buf := pgConn.wbuf
|
||||
buf = (&pgproto3.Parse{Name: name, Query: sql, ParameterOIDs: paramOIDs}).Encode(buf)
|
||||
buf = (&pgproto3.Describe{ObjectType: 'S', Name: name}).Encode(buf)
|
||||
buf = (&pgproto3.Sync{}).Encode(buf)
|
||||
var err error
|
||||
buf, err = (&pgproto3.Parse{Name: name, Query: sql, ParameterOIDs: paramOIDs}).Encode(buf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
buf, err = (&pgproto3.Describe{ObjectType: 'S', Name: name}).Encode(buf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
buf, err = (&pgproto3.Sync{}).Encode(buf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n, err := pgConn.conn.Write(buf)
|
||||
if err != nil {
|
||||
|
|
@ -1002,7 +1024,14 @@ func (pgConn *PgConn) Exec(ctx context.Context, sql string) *MultiResultReader {
|
|||
}
|
||||
|
||||
buf := pgConn.wbuf
|
||||
buf = (&pgproto3.Query{String: sql}).Encode(buf)
|
||||
var err error
|
||||
buf, err = (&pgproto3.Query{String: sql}).Encode(buf)
|
||||
if err != nil {
|
||||
return &MultiResultReader{
|
||||
closed: true,
|
||||
err: err,
|
||||
}
|
||||
}
|
||||
|
||||
n, err := pgConn.conn.Write(buf)
|
||||
if err != nil {
|
||||
|
|
@ -1076,8 +1105,24 @@ func (pgConn *PgConn) ExecParams(ctx context.Context, sql string, paramValues []
|
|||
}
|
||||
|
||||
buf := pgConn.wbuf
|
||||
buf = (&pgproto3.Parse{Query: sql, ParameterOIDs: paramOIDs}).Encode(buf)
|
||||
buf = (&pgproto3.Bind{ParameterFormatCodes: paramFormats, Parameters: paramValues, ResultFormatCodes: resultFormats}).Encode(buf)
|
||||
var err error
|
||||
buf, err = (&pgproto3.Parse{Query: sql, ParameterOIDs: paramOIDs}).Encode(buf)
|
||||
if err != nil {
|
||||
result.concludeCommand(nil, err)
|
||||
pgConn.contextWatcher.Unwatch()
|
||||
result.closed = true
|
||||
pgConn.unlock()
|
||||
return result
|
||||
}
|
||||
|
||||
buf, err = (&pgproto3.Bind{ParameterFormatCodes: paramFormats, Parameters: paramValues, ResultFormatCodes: resultFormats}).Encode(buf)
|
||||
if err != nil {
|
||||
result.concludeCommand(nil, err)
|
||||
pgConn.contextWatcher.Unwatch()
|
||||
result.closed = true
|
||||
pgConn.unlock()
|
||||
return result
|
||||
}
|
||||
|
||||
pgConn.execExtendedSuffix(buf, result)
|
||||
|
||||
|
|
@ -1103,7 +1148,15 @@ func (pgConn *PgConn) ExecPrepared(ctx context.Context, stmtName string, paramVa
|
|||
}
|
||||
|
||||
buf := pgConn.wbuf
|
||||
buf = (&pgproto3.Bind{PreparedStatement: stmtName, ParameterFormatCodes: paramFormats, Parameters: paramValues, ResultFormatCodes: resultFormats}).Encode(buf)
|
||||
var err error
|
||||
buf, err = (&pgproto3.Bind{PreparedStatement: stmtName, ParameterFormatCodes: paramFormats, Parameters: paramValues, ResultFormatCodes: resultFormats}).Encode(buf)
|
||||
if err != nil {
|
||||
result.concludeCommand(nil, err)
|
||||
pgConn.contextWatcher.Unwatch()
|
||||
result.closed = true
|
||||
pgConn.unlock()
|
||||
return result
|
||||
}
|
||||
|
||||
pgConn.execExtendedSuffix(buf, result)
|
||||
|
||||
|
|
@ -1146,9 +1199,31 @@ func (pgConn *PgConn) execExtendedPrefix(ctx context.Context, paramValues [][]by
|
|||
}
|
||||
|
||||
func (pgConn *PgConn) execExtendedSuffix(buf []byte, result *ResultReader) {
|
||||
buf = (&pgproto3.Describe{ObjectType: 'P'}).Encode(buf)
|
||||
buf = (&pgproto3.Execute{}).Encode(buf)
|
||||
buf = (&pgproto3.Sync{}).Encode(buf)
|
||||
var err error
|
||||
buf, err = (&pgproto3.Describe{ObjectType: 'P'}).Encode(buf)
|
||||
if err != nil {
|
||||
result.concludeCommand(nil, err)
|
||||
pgConn.contextWatcher.Unwatch()
|
||||
result.closed = true
|
||||
pgConn.unlock()
|
||||
return
|
||||
}
|
||||
buf, err = (&pgproto3.Execute{}).Encode(buf)
|
||||
if err != nil {
|
||||
result.concludeCommand(nil, err)
|
||||
pgConn.contextWatcher.Unwatch()
|
||||
result.closed = true
|
||||
pgConn.unlock()
|
||||
return
|
||||
}
|
||||
buf, err = (&pgproto3.Sync{}).Encode(buf)
|
||||
if err != nil {
|
||||
result.concludeCommand(nil, err)
|
||||
pgConn.contextWatcher.Unwatch()
|
||||
result.closed = true
|
||||
pgConn.unlock()
|
||||
return
|
||||
}
|
||||
|
||||
n, err := pgConn.conn.Write(buf)
|
||||
if err != nil {
|
||||
|
|
@ -1182,7 +1257,12 @@ func (pgConn *PgConn) CopyTo(ctx context.Context, w io.Writer, sql string) (Comm
|
|||
|
||||
// Send copy to command
|
||||
buf := pgConn.wbuf
|
||||
buf = (&pgproto3.Query{String: sql}).Encode(buf)
|
||||
var err error
|
||||
buf, err = (&pgproto3.Query{String: sql}).Encode(buf)
|
||||
if err != nil {
|
||||
pgConn.unlock()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n, err := pgConn.conn.Write(buf)
|
||||
if err != nil {
|
||||
|
|
@ -1242,7 +1322,12 @@ func (pgConn *PgConn) CopyFrom(ctx context.Context, r io.Reader, sql string) (Co
|
|||
|
||||
// Send copy to command
|
||||
buf := pgConn.wbuf
|
||||
buf = (&pgproto3.Query{String: sql}).Encode(buf)
|
||||
var err error
|
||||
buf, err = (&pgproto3.Query{String: sql}).Encode(buf)
|
||||
if err != nil {
|
||||
pgConn.unlock()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n, err := pgConn.conn.Write(buf)
|
||||
if err != nil {
|
||||
|
|
@ -1318,10 +1403,20 @@ func (pgConn *PgConn) CopyFrom(ctx context.Context, r io.Reader, sql string) (Co
|
|||
buf = buf[:0]
|
||||
if copyErr == io.EOF || pgErr != nil {
|
||||
copyDone := &pgproto3.CopyDone{}
|
||||
buf = copyDone.Encode(buf)
|
||||
var err error
|
||||
buf, err = copyDone.Encode(buf)
|
||||
if err != nil {
|
||||
pgConn.asyncClose()
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
copyFail := &pgproto3.CopyFail{Message: copyErr.Error()}
|
||||
buf = copyFail.Encode(buf)
|
||||
var err error
|
||||
buf, err = copyFail.Encode(buf)
|
||||
if err != nil {
|
||||
pgConn.asyncClose()
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
_, err = pgConn.conn.Write(buf)
|
||||
if err != nil {
|
||||
|
|
@ -1628,24 +1723,54 @@ func (rr *ResultReader) concludeCommand(commandTag CommandTag, err error) {
|
|||
// Batch is a collection of queries that can be sent to the PostgreSQL server in a single round-trip.
|
||||
type Batch struct {
|
||||
buf []byte
|
||||
err error
|
||||
}
|
||||
|
||||
// ExecParams appends an ExecParams command to the batch. See PgConn.ExecParams for parameter descriptions.
|
||||
func (batch *Batch) ExecParams(sql string, paramValues [][]byte, paramOIDs []uint32, paramFormats []int16, resultFormats []int16) {
|
||||
batch.buf = (&pgproto3.Parse{Query: sql, ParameterOIDs: paramOIDs}).Encode(batch.buf)
|
||||
if batch.err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
batch.buf, batch.err = (&pgproto3.Parse{Query: sql, ParameterOIDs: paramOIDs}).Encode(batch.buf)
|
||||
if batch.err != nil {
|
||||
return
|
||||
}
|
||||
batch.ExecPrepared("", paramValues, paramFormats, resultFormats)
|
||||
}
|
||||
|
||||
// ExecPrepared appends an ExecPrepared e command to the batch. See PgConn.ExecPrepared for parameter descriptions.
|
||||
func (batch *Batch) ExecPrepared(stmtName string, paramValues [][]byte, paramFormats []int16, resultFormats []int16) {
|
||||
batch.buf = (&pgproto3.Bind{PreparedStatement: stmtName, ParameterFormatCodes: paramFormats, Parameters: paramValues, ResultFormatCodes: resultFormats}).Encode(batch.buf)
|
||||
batch.buf = (&pgproto3.Describe{ObjectType: 'P'}).Encode(batch.buf)
|
||||
batch.buf = (&pgproto3.Execute{}).Encode(batch.buf)
|
||||
if batch.err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
batch.buf, batch.err = (&pgproto3.Bind{PreparedStatement: stmtName, ParameterFormatCodes: paramFormats, Parameters: paramValues, ResultFormatCodes: resultFormats}).Encode(batch.buf)
|
||||
if batch.err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
batch.buf, batch.err = (&pgproto3.Describe{ObjectType: 'P'}).Encode(batch.buf)
|
||||
if batch.err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
batch.buf, batch.err = (&pgproto3.Execute{}).Encode(batch.buf)
|
||||
if batch.err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// ExecBatch executes all the queries in batch in a single round-trip. Execution is implicitly transactional unless a
|
||||
// transaction is already in progress or SQL contains transaction control statements.
|
||||
func (pgConn *PgConn) ExecBatch(ctx context.Context, batch *Batch) *MultiResultReader {
|
||||
if batch.err != nil {
|
||||
return &MultiResultReader{
|
||||
closed: true,
|
||||
err: batch.err,
|
||||
}
|
||||
}
|
||||
|
||||
if err := pgConn.lock(); err != nil {
|
||||
return &MultiResultReader{
|
||||
closed: true,
|
||||
|
|
@ -1671,7 +1796,13 @@ func (pgConn *PgConn) ExecBatch(ctx context.Context, batch *Batch) *MultiResultR
|
|||
pgConn.contextWatcher.Watch(ctx)
|
||||
}
|
||||
|
||||
batch.buf = (&pgproto3.Sync{}).Encode(batch.buf)
|
||||
batch.buf, batch.err = (&pgproto3.Sync{}).Encode(batch.buf)
|
||||
if batch.err != nil {
|
||||
multiResult.closed = true
|
||||
multiResult.err = batch.err
|
||||
pgConn.unlock()
|
||||
return multiResult
|
||||
}
|
||||
|
||||
// A large batch can deadlock without concurrent reading and writing. If the Write fails the underlying net.Conn is
|
||||
// closed. This is all that can be done without introducing a race condition or adding a concurrent safe communication
|
||||
|
|
|
|||
7
vendor/github.com/jackc/pgproto3/v2/authentication_cleartext_password.go
generated
vendored
7
vendor/github.com/jackc/pgproto3/v2/authentication_cleartext_password.go
generated
vendored
|
|
@ -35,11 +35,10 @@ func (dst *AuthenticationCleartextPassword) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *AuthenticationCleartextPassword) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'R')
|
||||
dst = pgio.AppendInt32(dst, 8)
|
||||
func (src *AuthenticationCleartextPassword) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'R')
|
||||
dst = pgio.AppendUint32(dst, AuthTypeCleartextPassword)
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
8
vendor/github.com/jackc/pgproto3/v2/authentication_gss.go
generated
vendored
8
vendor/github.com/jackc/pgproto3/v2/authentication_gss.go
generated
vendored
|
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
)
|
||||
|
||||
|
|
@ -26,11 +27,10 @@ func (a *AuthenticationGSS) Decode(src []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (a *AuthenticationGSS) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'R')
|
||||
dst = pgio.AppendInt32(dst, 4)
|
||||
func (a *AuthenticationGSS) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'R')
|
||||
dst = pgio.AppendUint32(dst, AuthTypeGSS)
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
func (a *AuthenticationGSS) MarshalJSON() ([]byte, error) {
|
||||
|
|
|
|||
8
vendor/github.com/jackc/pgproto3/v2/authentication_gss_continue.go
generated
vendored
8
vendor/github.com/jackc/pgproto3/v2/authentication_gss_continue.go
generated
vendored
|
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
)
|
||||
|
||||
|
|
@ -30,12 +31,11 @@ func (a *AuthenticationGSSContinue) Decode(src []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (a *AuthenticationGSSContinue) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'R')
|
||||
dst = pgio.AppendInt32(dst, int32(len(a.Data))+8)
|
||||
func (a *AuthenticationGSSContinue) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'R')
|
||||
dst = pgio.AppendUint32(dst, AuthTypeGSSCont)
|
||||
dst = append(dst, a.Data...)
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
func (a *AuthenticationGSSContinue) MarshalJSON() ([]byte, error) {
|
||||
|
|
|
|||
7
vendor/github.com/jackc/pgproto3/v2/authentication_md5_password.go
generated
vendored
7
vendor/github.com/jackc/pgproto3/v2/authentication_md5_password.go
generated
vendored
|
|
@ -38,12 +38,11 @@ func (dst *AuthenticationMD5Password) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *AuthenticationMD5Password) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'R')
|
||||
dst = pgio.AppendInt32(dst, 12)
|
||||
func (src *AuthenticationMD5Password) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'R')
|
||||
dst = pgio.AppendUint32(dst, AuthTypeMD5Password)
|
||||
dst = append(dst, src.Salt[:]...)
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
7
vendor/github.com/jackc/pgproto3/v2/authentication_ok.go
generated
vendored
7
vendor/github.com/jackc/pgproto3/v2/authentication_ok.go
generated
vendored
|
|
@ -35,11 +35,10 @@ func (dst *AuthenticationOk) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *AuthenticationOk) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'R')
|
||||
dst = pgio.AppendInt32(dst, 8)
|
||||
func (src *AuthenticationOk) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'R')
|
||||
dst = pgio.AppendUint32(dst, AuthTypeOk)
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
10
vendor/github.com/jackc/pgproto3/v2/authentication_sasl.go
generated
vendored
10
vendor/github.com/jackc/pgproto3/v2/authentication_sasl.go
generated
vendored
|
|
@ -46,10 +46,8 @@ func (dst *AuthenticationSASL) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *AuthenticationSASL) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'R')
|
||||
sp := len(dst)
|
||||
dst = pgio.AppendInt32(dst, -1)
|
||||
func (src *AuthenticationSASL) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'R')
|
||||
dst = pgio.AppendUint32(dst, AuthTypeSASL)
|
||||
|
||||
for _, s := range src.AuthMechanisms {
|
||||
|
|
@ -58,9 +56,7 @@ func (src *AuthenticationSASL) Encode(dst []byte) []byte {
|
|||
}
|
||||
dst = append(dst, 0)
|
||||
|
||||
pgio.SetInt32(dst[sp:], int32(len(dst[sp:])))
|
||||
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
12
vendor/github.com/jackc/pgproto3/v2/authentication_sasl_continue.go
generated
vendored
12
vendor/github.com/jackc/pgproto3/v2/authentication_sasl_continue.go
generated
vendored
|
|
@ -38,17 +38,11 @@ func (dst *AuthenticationSASLContinue) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *AuthenticationSASLContinue) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'R')
|
||||
sp := len(dst)
|
||||
dst = pgio.AppendInt32(dst, -1)
|
||||
func (src *AuthenticationSASLContinue) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'R')
|
||||
dst = pgio.AppendUint32(dst, AuthTypeSASLContinue)
|
||||
|
||||
dst = append(dst, src.Data...)
|
||||
|
||||
pgio.SetInt32(dst[sp:], int32(len(dst[sp:])))
|
||||
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
12
vendor/github.com/jackc/pgproto3/v2/authentication_sasl_final.go
generated
vendored
12
vendor/github.com/jackc/pgproto3/v2/authentication_sasl_final.go
generated
vendored
|
|
@ -38,17 +38,11 @@ func (dst *AuthenticationSASLFinal) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *AuthenticationSASLFinal) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'R')
|
||||
sp := len(dst)
|
||||
dst = pgio.AppendInt32(dst, -1)
|
||||
func (src *AuthenticationSASLFinal) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'R')
|
||||
dst = pgio.AppendUint32(dst, AuthTypeSASLFinal)
|
||||
|
||||
dst = append(dst, src.Data...)
|
||||
|
||||
pgio.SetInt32(dst[sp:], int32(len(dst[sp:])))
|
||||
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Unmarshaler.
|
||||
|
|
|
|||
15
vendor/github.com/jackc/pgproto3/v2/backend.go
generated
vendored
15
vendor/github.com/jackc/pgproto3/v2/backend.go
generated
vendored
|
|
@ -49,7 +49,12 @@ func NewBackend(cr ChunkReader, w io.Writer) *Backend {
|
|||
|
||||
// Send sends a message to the frontend.
|
||||
func (b *Backend) Send(msg BackendMessage) error {
|
||||
_, err := b.w.Write(msg.Encode(nil))
|
||||
buf, err := msg.Encode(nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = b.w.Write(buf)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -184,11 +189,11 @@ func (b *Backend) Receive() (FrontendMessage, error) {
|
|||
// contextual identification of FrontendMessages. For example, in the
|
||||
// PG message flow documentation for PasswordMessage:
|
||||
//
|
||||
// Byte1('p')
|
||||
// Byte1('p')
|
||||
//
|
||||
// Identifies the message as a password response. Note that this is also used for
|
||||
// GSSAPI, SSPI and SASL response messages. The exact message type can be deduced from
|
||||
// the context.
|
||||
// Identifies the message as a password response. Note that this is also used for
|
||||
// GSSAPI, SSPI and SASL response messages. The exact message type can be deduced from
|
||||
// the context.
|
||||
//
|
||||
// Since the Frontend does not know about the state of a backend, it is important
|
||||
// to call SetAuthType() after an authentication request is received by the Frontend.
|
||||
|
|
|
|||
7
vendor/github.com/jackc/pgproto3/v2/backend_key_data.go
generated
vendored
7
vendor/github.com/jackc/pgproto3/v2/backend_key_data.go
generated
vendored
|
|
@ -29,12 +29,11 @@ func (dst *BackendKeyData) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *BackendKeyData) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'K')
|
||||
dst = pgio.AppendUint32(dst, 12)
|
||||
func (src *BackendKeyData) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'K')
|
||||
dst = pgio.AppendUint32(dst, src.ProcessID)
|
||||
dst = pgio.AppendUint32(dst, src.SecretKey)
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
21
vendor/github.com/jackc/pgproto3/v2/bind.go
generated
vendored
21
vendor/github.com/jackc/pgproto3/v2/bind.go
generated
vendored
|
|
@ -5,7 +5,9 @@ import (
|
|||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
)
|
||||
|
|
@ -108,21 +110,25 @@ func (dst *Bind) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *Bind) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'B')
|
||||
sp := len(dst)
|
||||
dst = pgio.AppendInt32(dst, -1)
|
||||
func (src *Bind) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'B')
|
||||
|
||||
dst = append(dst, src.DestinationPortal...)
|
||||
dst = append(dst, 0)
|
||||
dst = append(dst, src.PreparedStatement...)
|
||||
dst = append(dst, 0)
|
||||
|
||||
if len(src.ParameterFormatCodes) > math.MaxUint16 {
|
||||
return nil, errors.New("too many parameter format codes")
|
||||
}
|
||||
dst = pgio.AppendUint16(dst, uint16(len(src.ParameterFormatCodes)))
|
||||
for _, fc := range src.ParameterFormatCodes {
|
||||
dst = pgio.AppendInt16(dst, fc)
|
||||
}
|
||||
|
||||
if len(src.Parameters) > math.MaxUint16 {
|
||||
return nil, errors.New("too many parameters")
|
||||
}
|
||||
dst = pgio.AppendUint16(dst, uint16(len(src.Parameters)))
|
||||
for _, p := range src.Parameters {
|
||||
if p == nil {
|
||||
|
|
@ -134,14 +140,15 @@ func (src *Bind) Encode(dst []byte) []byte {
|
|||
dst = append(dst, p...)
|
||||
}
|
||||
|
||||
if len(src.ResultFormatCodes) > math.MaxUint16 {
|
||||
return nil, errors.New("too many result format codes")
|
||||
}
|
||||
dst = pgio.AppendUint16(dst, uint16(len(src.ResultFormatCodes)))
|
||||
for _, fc := range src.ResultFormatCodes {
|
||||
dst = pgio.AppendInt16(dst, fc)
|
||||
}
|
||||
|
||||
pgio.SetInt32(dst[sp:], int32(len(dst[sp:])))
|
||||
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
4
vendor/github.com/jackc/pgproto3/v2/bind_complete.go
generated
vendored
4
vendor/github.com/jackc/pgproto3/v2/bind_complete.go
generated
vendored
|
|
@ -20,8 +20,8 @@ func (dst *BindComplete) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *BindComplete) Encode(dst []byte) []byte {
|
||||
return append(dst, '2', 0, 0, 0, 4)
|
||||
func (src *BindComplete) Encode(dst []byte) ([]byte, error) {
|
||||
return append(dst, '2', 0, 0, 0, 4), nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
4
vendor/github.com/jackc/pgproto3/v2/cancel_request.go
generated
vendored
4
vendor/github.com/jackc/pgproto3/v2/cancel_request.go
generated
vendored
|
|
@ -36,12 +36,12 @@ func (dst *CancelRequest) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 4 byte message length.
|
||||
func (src *CancelRequest) Encode(dst []byte) []byte {
|
||||
func (src *CancelRequest) Encode(dst []byte) ([]byte, error) {
|
||||
dst = pgio.AppendInt32(dst, 16)
|
||||
dst = pgio.AppendInt32(dst, cancelRequestCode)
|
||||
dst = pgio.AppendUint32(dst, src.ProcessID)
|
||||
dst = pgio.AppendUint32(dst, src.SecretKey)
|
||||
return dst
|
||||
return dst, nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
14
vendor/github.com/jackc/pgproto3/v2/close.go
generated
vendored
14
vendor/github.com/jackc/pgproto3/v2/close.go
generated
vendored
|
|
@ -4,8 +4,6 @@ import (
|
|||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
)
|
||||
|
||||
type Close struct {
|
||||
|
|
@ -37,18 +35,12 @@ func (dst *Close) Decode(src []byte) error {
|
|||
}
|
||||
|
||||
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
|
||||
func (src *Close) Encode(dst []byte) []byte {
|
||||
dst = append(dst, 'C')
|
||||
sp := len(dst)
|
||||
dst = pgio.AppendInt32(dst, -1)
|
||||
|
||||
func (src *Close) Encode(dst []byte) ([]byte, error) {
|
||||
dst, sp := beginMessage(dst, 'C')
|
||||
dst = append(dst, src.ObjectType)
|
||||
dst = append(dst, src.Name...)
|
||||
dst = append(dst, 0)
|
||||
|
||||
pgio.SetInt32(dst[sp:], int32(len(dst[sp:])))
|
||||
|
||||
return dst
|
||||
return finishMessage(dst, sp)
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue