[Release] sdk/resourcemanager/containerservicefleet/armcontainerservicefleet/1.3.0-beta.1 (#23530)

* [Release] sdk/resourcemanager/containerservicefleet/armcontainerservicefleet/1.3.0-beta.1 generation from spec commit: ad60d7f8eba124edc6999677c55aba2184e303b0

* update recording

---------

Co-authored-by: ReleaseHelper <ReleaseHelper>
Co-authored-by: fz <v-fending@microsoft.com>
This commit is contained in:
Azure SDK Bot 2024-10-22 08:03:45 -07:00 коммит произвёл GitHub
Родитель 0c4fec9ae6
Коммит 5635b52606
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
24 изменённых файлов: 1311 добавлений и 93 удалений

Просмотреть файл

@ -1,5 +1,26 @@
# Release History
## 1.3.0-beta.1 (2024-10-25)
### Features Added
- New value `NodeImageSelectionTypeCustom` added to enum type `NodeImageSelectionType`
- New enum type `AutoUpgradeNodeImageSelectionType` with values `AutoUpgradeNodeImageSelectionTypeConsistent`, `AutoUpgradeNodeImageSelectionTypeLatest`
- New enum type `AutoUpgradeProfileProvisioningState` with values `AutoUpgradeProfileProvisioningStateCanceled`, `AutoUpgradeProfileProvisioningStateFailed`, `AutoUpgradeProfileProvisioningStateSucceeded`
- New enum type `UpgradeChannel` with values `UpgradeChannelNodeImage`, `UpgradeChannelRapid`, `UpgradeChannelStable`
- New function `NewAutoUpgradeProfilesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AutoUpgradeProfilesClient, error)`
- New function `*AutoUpgradeProfilesClient.BeginCreateOrUpdate(context.Context, string, string, string, AutoUpgradeProfile, *AutoUpgradeProfilesClientBeginCreateOrUpdateOptions) (*runtime.Poller[AutoUpgradeProfilesClientCreateOrUpdateResponse], error)`
- New function `*AutoUpgradeProfilesClient.BeginDelete(context.Context, string, string, string, *AutoUpgradeProfilesClientBeginDeleteOptions) (*runtime.Poller[AutoUpgradeProfilesClientDeleteResponse], error)`
- New function `*AutoUpgradeProfilesClient.Get(context.Context, string, string, string, *AutoUpgradeProfilesClientGetOptions) (AutoUpgradeProfilesClientGetResponse, error)`
- New function `*AutoUpgradeProfilesClient.NewListByFleetPager(string, string, *AutoUpgradeProfilesClientListByFleetOptions) *runtime.Pager[AutoUpgradeProfilesClientListByFleetResponse]`
- New function `*ClientFactory.NewAutoUpgradeProfilesClient() *AutoUpgradeProfilesClient`
- New struct `AutoUpgradeNodeImageSelection`
- New struct `AutoUpgradeProfile`
- New struct `AutoUpgradeProfileListResult`
- New struct `AutoUpgradeProfileProperties`
- New field `EnableVnetIntegration`, `SubnetID` in struct `APIServerAccessProfile`
- New field `CustomNodeImageVersions` in struct `NodeImageSelection`
## 1.2.0 (2024-05-24)
### Features Added

Просмотреть файл

@ -57,7 +57,7 @@ clientFactory, err := armcontainerservicefleet.NewClientFactory(<subscription ID
A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.
```go
client := clientFactory.NewFleetMembersClient()
client := clientFactory.NewAutoUpgradeProfilesClient()
```
## Fakes

Просмотреть файл

@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/resourcemanager/containerservicefleet/armcontainerservicefleet",
"Tag": "go/resourcemanager/containerservicefleet/armcontainerservicefleet_f042d4cdd4"
"Tag": "go/resourcemanager/containerservicefleet/armcontainerservicefleet_1fe8249191"
}

Просмотреть файл

@ -5,9 +5,9 @@
``` yaml
azure-arm: true
require:
- https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md
- https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.go.md
- https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md
- https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.go.md
license-header: MICROSOFT_MIT_NO_VERSION
module-version: 1.2.0
tag: package-2024-04
module-version: 1.3.0-beta.1
tag: package-2024-05-preview
```

Просмотреть файл

@ -0,0 +1,355 @@
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package armcontainerservicefleet
import (
"context"
"errors"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"net/http"
"net/url"
"strings"
)
// AutoUpgradeProfilesClient contains the methods for the AutoUpgradeProfiles group.
// Don't use this type directly, use NewAutoUpgradeProfilesClient() instead.
type AutoUpgradeProfilesClient struct {
internal *arm.Client
subscriptionID string
}
// NewAutoUpgradeProfilesClient creates a new instance of AutoUpgradeProfilesClient with the specified values.
// - subscriptionID - The ID of the target subscription.
// - credential - used to authorize requests. Usually a credential from azidentity.
// - options - pass nil to accept the default values.
func NewAutoUpgradeProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AutoUpgradeProfilesClient, error) {
cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
if err != nil {
return nil, err
}
client := &AutoUpgradeProfilesClient{
subscriptionID: subscriptionID,
internal: cl,
}
return client, nil
}
// BeginCreateOrUpdate - Create a AutoUpgradeProfile
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - autoUpgradeProfileName - The name of the AutoUpgradeProfile resource.
// - resource - Resource create parameters.
// - options - AutoUpgradeProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the AutoUpgradeProfilesClient.BeginCreateOrUpdate
// method.
func (client *AutoUpgradeProfilesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, resource AutoUpgradeProfile, options *AutoUpgradeProfilesClientBeginCreateOrUpdateOptions) (*runtime.Poller[AutoUpgradeProfilesClientCreateOrUpdateResponse], error) {
if options == nil || options.ResumeToken == "" {
resp, err := client.createOrUpdate(ctx, resourceGroupName, fleetName, autoUpgradeProfileName, resource, options)
if err != nil {
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AutoUpgradeProfilesClientCreateOrUpdateResponse]{
FinalStateVia: runtime.FinalStateViaAzureAsyncOp,
Tracer: client.internal.Tracer(),
})
return poller, err
} else {
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AutoUpgradeProfilesClientCreateOrUpdateResponse]{
Tracer: client.internal.Tracer(),
})
}
}
// CreateOrUpdate - Create a AutoUpgradeProfile
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-02-preview
func (client *AutoUpgradeProfilesClient) createOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, resource AutoUpgradeProfile, options *AutoUpgradeProfilesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "AutoUpgradeProfilesClient.BeginCreateOrUpdate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, fleetName, autoUpgradeProfileName, resource, options)
if err != nil {
return nil, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return nil, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
err = runtime.NewResponseError(httpResp)
return nil, err
}
return httpResp, nil
}
// createOrUpdateCreateRequest creates the CreateOrUpdate request.
func (client *AutoUpgradeProfilesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, resource AutoUpgradeProfile, options *AutoUpgradeProfilesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
if resourceGroupName == "" {
return nil, errors.New("parameter resourceGroupName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
if fleetName == "" {
return nil, errors.New("parameter fleetName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{fleetName}", url.PathEscape(fleetName))
if autoUpgradeProfileName == "" {
return nil, errors.New("parameter autoUpgradeProfileName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{autoUpgradeProfileName}", url.PathEscape(autoUpgradeProfileName))
req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
}
if options != nil && options.IfNoneMatch != nil {
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
}
if err := runtime.MarshalAsJSON(req, resource); err != nil {
return nil, err
}
return req, nil
}
// BeginDelete - Delete a AutoUpgradeProfile
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - autoUpgradeProfileName - The name of the AutoUpgradeProfile resource.
// - options - AutoUpgradeProfilesClientBeginDeleteOptions contains the optional parameters for the AutoUpgradeProfilesClient.BeginDelete
// method.
func (client *AutoUpgradeProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, options *AutoUpgradeProfilesClientBeginDeleteOptions) (*runtime.Poller[AutoUpgradeProfilesClientDeleteResponse], error) {
if options == nil || options.ResumeToken == "" {
resp, err := client.deleteOperation(ctx, resourceGroupName, fleetName, autoUpgradeProfileName, options)
if err != nil {
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AutoUpgradeProfilesClientDeleteResponse]{
FinalStateVia: runtime.FinalStateViaLocation,
Tracer: client.internal.Tracer(),
})
return poller, err
} else {
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AutoUpgradeProfilesClientDeleteResponse]{
Tracer: client.internal.Tracer(),
})
}
}
// Delete - Delete a AutoUpgradeProfile
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-02-preview
func (client *AutoUpgradeProfilesClient) deleteOperation(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, options *AutoUpgradeProfilesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "AutoUpgradeProfilesClient.BeginDelete"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.deleteCreateRequest(ctx, resourceGroupName, fleetName, autoUpgradeProfileName, options)
if err != nil {
return nil, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return nil, err
}
if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) {
err = runtime.NewResponseError(httpResp)
return nil, err
}
return httpResp, nil
}
// deleteCreateRequest creates the Delete request.
func (client *AutoUpgradeProfilesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, options *AutoUpgradeProfilesClientBeginDeleteOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
if resourceGroupName == "" {
return nil, errors.New("parameter resourceGroupName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
if fleetName == "" {
return nil, errors.New("parameter fleetName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{fleetName}", url.PathEscape(fleetName))
if autoUpgradeProfileName == "" {
return nil, errors.New("parameter autoUpgradeProfileName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{autoUpgradeProfileName}", url.PathEscape(autoUpgradeProfileName))
req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-02-preview")
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}
}
return req, nil
}
// Get - Get a AutoUpgradeProfile
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - autoUpgradeProfileName - The name of the AutoUpgradeProfile resource.
// - options - AutoUpgradeProfilesClientGetOptions contains the optional parameters for the AutoUpgradeProfilesClient.Get method.
func (client *AutoUpgradeProfilesClient) Get(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, options *AutoUpgradeProfilesClientGetOptions) (AutoUpgradeProfilesClientGetResponse, error) {
var err error
const operationName = "AutoUpgradeProfilesClient.Get"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getCreateRequest(ctx, resourceGroupName, fleetName, autoUpgradeProfileName, options)
if err != nil {
return AutoUpgradeProfilesClientGetResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return AutoUpgradeProfilesClientGetResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return AutoUpgradeProfilesClientGetResponse{}, err
}
resp, err := client.getHandleResponse(httpResp)
return resp, err
}
// getCreateRequest creates the Get request.
func (client *AutoUpgradeProfilesClient) getCreateRequest(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, options *AutoUpgradeProfilesClientGetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
if resourceGroupName == "" {
return nil, errors.New("parameter resourceGroupName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
if fleetName == "" {
return nil, errors.New("parameter fleetName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{fleetName}", url.PathEscape(fleetName))
if autoUpgradeProfileName == "" {
return nil, errors.New("parameter autoUpgradeProfileName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{autoUpgradeProfileName}", url.PathEscape(autoUpgradeProfileName))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getHandleResponse handles the Get response.
func (client *AutoUpgradeProfilesClient) getHandleResponse(resp *http.Response) (AutoUpgradeProfilesClientGetResponse, error) {
result := AutoUpgradeProfilesClientGetResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.AutoUpgradeProfile); err != nil {
return AutoUpgradeProfilesClientGetResponse{}, err
}
return result, nil
}
// NewListByFleetPager - List AutoUpgradeProfile resources by Fleet
//
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - options - AutoUpgradeProfilesClientListByFleetOptions contains the optional parameters for the AutoUpgradeProfilesClient.NewListByFleetPager
// method.
func (client *AutoUpgradeProfilesClient) NewListByFleetPager(resourceGroupName string, fleetName string, options *AutoUpgradeProfilesClientListByFleetOptions) *runtime.Pager[AutoUpgradeProfilesClientListByFleetResponse] {
return runtime.NewPager(runtime.PagingHandler[AutoUpgradeProfilesClientListByFleetResponse]{
More: func(page AutoUpgradeProfilesClientListByFleetResponse) bool {
return page.NextLink != nil && len(*page.NextLink) > 0
},
Fetcher: func(ctx context.Context, page *AutoUpgradeProfilesClientListByFleetResponse) (AutoUpgradeProfilesClientListByFleetResponse, error) {
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AutoUpgradeProfilesClient.NewListByFleetPager")
nextLink := ""
if page != nil {
nextLink = *page.NextLink
}
resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
return client.listByFleetCreateRequest(ctx, resourceGroupName, fleetName, options)
}, nil)
if err != nil {
return AutoUpgradeProfilesClientListByFleetResponse{}, err
}
return client.listByFleetHandleResponse(resp)
},
Tracer: client.internal.Tracer(),
})
}
// listByFleetCreateRequest creates the ListByFleet request.
func (client *AutoUpgradeProfilesClient) listByFleetCreateRequest(ctx context.Context, resourceGroupName string, fleetName string, options *AutoUpgradeProfilesClientListByFleetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
if resourceGroupName == "" {
return nil, errors.New("parameter resourceGroupName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
if fleetName == "" {
return nil, errors.New("parameter fleetName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{fleetName}", url.PathEscape(fleetName))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// listByFleetHandleResponse handles the ListByFleet response.
func (client *AutoUpgradeProfilesClient) listByFleetHandleResponse(resp *http.Response) (AutoUpgradeProfilesClientListByFleetResponse, error) {
result := AutoUpgradeProfilesClientListByFleetResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.AutoUpgradeProfileListResult); err != nil {
return AutoUpgradeProfilesClientListByFleetResponse{}, err
}
return result, nil
}

Просмотреть файл

@ -0,0 +1,172 @@
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package armcontainerservicefleet_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_ListByFleet.json
func ExampleAutoUpgradeProfilesClient_NewListByFleetPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAutoUpgradeProfilesClient().NewListByFleetPager("rg1", "fleet1", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.AutoUpgradeProfileListResult = armcontainerservicefleet.AutoUpgradeProfileListResult{
// Value: []*armcontainerservicefleet.AutoUpgradeProfile{
// {
// Name: to.Ptr("autoupgradeprofile1"),
// Type: to.Ptr("Microsoft.ContainerService/fleets/autoUpgradeProfiles"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/autoUpgradeProfiles/autoupgradeprofile1"),
// SystemData: &armcontainerservicefleet.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()),
// CreatedBy: to.Ptr("@contoso.com"),
// CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()),
// LastModifiedBy: to.Ptr("@contoso.com"),
// LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser),
// },
// ETag: to.Ptr("\"EtagValue\""),
// Properties: &armcontainerservicefleet.AutoUpgradeProfileProperties{
// Channel: to.Ptr(armcontainerservicefleet.UpgradeChannelStable),
// ProvisioningState: to.Ptr(armcontainerservicefleet.AutoUpgradeProfileProvisioningStateSucceeded),
// },
// }},
// }
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_Get.json
func ExampleAutoUpgradeProfilesClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAutoUpgradeProfilesClient().Get(ctx, "rg1", "fleet1", "autoupgradeprofile1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AutoUpgradeProfile = armcontainerservicefleet.AutoUpgradeProfile{
// Name: to.Ptr("autoupgradeprofile1"),
// Type: to.Ptr("Microsoft.ContainerService/fleets/autoUpgradeProfiles"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/autoUpgradeProfiles/autoupgradeprofile1"),
// SystemData: &armcontainerservicefleet.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()),
// CreatedBy: to.Ptr("@contoso.com"),
// CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()),
// LastModifiedBy: to.Ptr("@contoso.com"),
// LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser),
// },
// ETag: to.Ptr("\"EtagValue\""),
// Properties: &armcontainerservicefleet.AutoUpgradeProfileProperties{
// Channel: to.Ptr(armcontainerservicefleet.UpgradeChannelStable),
// ProvisioningState: to.Ptr(armcontainerservicefleet.AutoUpgradeProfileProvisioningStateSucceeded),
// },
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_CreateOrUpdate.json
func ExampleAutoUpgradeProfilesClient_BeginCreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAutoUpgradeProfilesClient().BeginCreateOrUpdate(ctx, "rg1", "fleet1", "autoupgradeprofile1", armcontainerservicefleet.AutoUpgradeProfile{
Properties: &armcontainerservicefleet.AutoUpgradeProfileProperties{
Channel: to.Ptr(armcontainerservicefleet.UpgradeChannelStable),
},
}, &armcontainerservicefleet.AutoUpgradeProfilesClientBeginCreateOrUpdateOptions{IfMatch: nil,
IfNoneMatch: nil,
})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AutoUpgradeProfile = armcontainerservicefleet.AutoUpgradeProfile{
// Name: to.Ptr("autoupgradeprofile1"),
// Type: to.Ptr("Microsoft.ContainerService/fleets/autoUpgradeProfiles"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/autoUpgradeProfiles/autoupgradeprofile1"),
// SystemData: &armcontainerservicefleet.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()),
// CreatedBy: to.Ptr("@contoso.com"),
// CreatedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-01T01:10:08.395Z"); return t}()),
// LastModifiedBy: to.Ptr("@contoso.com"),
// LastModifiedByType: to.Ptr(armcontainerservicefleet.CreatedByTypeUser),
// },
// ETag: to.Ptr("\"EtagValue\""),
// Properties: &armcontainerservicefleet.AutoUpgradeProfileProperties{
// Channel: to.Ptr(armcontainerservicefleet.UpgradeChannelStable),
// ProvisioningState: to.Ptr(armcontainerservicefleet.AutoUpgradeProfileProvisioningStateSucceeded),
// },
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/AutoUpgradeProfiles_Delete.json
func ExampleAutoUpgradeProfilesClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicefleet.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAutoUpgradeProfilesClient().BeginDelete(ctx, "rg1", "fleet1", "autoupgradeprofile1", &armcontainerservicefleet.AutoUpgradeProfilesClientBeginDeleteOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

Просмотреть файл

@ -36,6 +36,14 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential,
}, nil
}
// NewAutoUpgradeProfilesClient creates a new instance of AutoUpgradeProfilesClient.
func (c *ClientFactory) NewAutoUpgradeProfilesClient() *AutoUpgradeProfilesClient {
return &AutoUpgradeProfilesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewFleetMembersClient creates a new instance of FleetMembersClient.
func (c *ClientFactory) NewFleetMembersClient() *FleetMembersClient {
return &FleetMembersClient{

Просмотреть файл

@ -10,7 +10,7 @@ package armcontainerservicefleet
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet"
moduleVersion = "v1.2.0"
moduleVersion = "v1.3.0-beta.1"
)
// ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
@ -27,6 +27,53 @@ func PossibleActionTypeValues() []ActionType {
}
}
// AutoUpgradeNodeImageSelectionType - The node image upgrade type.
type AutoUpgradeNodeImageSelectionType string
const (
// AutoUpgradeNodeImageSelectionTypeConsistent - The image versions to upgrade nodes to are selected as described below: for
// each node pool in managed clusters affected by the update run, the system selects the latest image version such that it
// is available across all other node pools (in all other clusters) of the same image type. As a result, all node pools of
// the same image type will be upgraded to the same image version. For example, if the latest image version for image type
// 'AKSUbuntu-1804gen2containerd' is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and
// is 'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system will upgrade both node
// pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'.
AutoUpgradeNodeImageSelectionTypeConsistent AutoUpgradeNodeImageSelectionType = "Consistent"
// AutoUpgradeNodeImageSelectionTypeLatest - Use the latest image version when upgrading nodes. Clusters may use different
// image versions (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because,
// for example, the latest available version is different in different regions.
AutoUpgradeNodeImageSelectionTypeLatest AutoUpgradeNodeImageSelectionType = "Latest"
)
// PossibleAutoUpgradeNodeImageSelectionTypeValues returns the possible values for the AutoUpgradeNodeImageSelectionType const type.
func PossibleAutoUpgradeNodeImageSelectionTypeValues() []AutoUpgradeNodeImageSelectionType {
return []AutoUpgradeNodeImageSelectionType{
AutoUpgradeNodeImageSelectionTypeConsistent,
AutoUpgradeNodeImageSelectionTypeLatest,
}
}
// AutoUpgradeProfileProvisioningState - The provisioning state of the AutoUpgradeProfile resource.
type AutoUpgradeProfileProvisioningState string
const (
// AutoUpgradeProfileProvisioningStateCanceled - Resource creation was canceled.
AutoUpgradeProfileProvisioningStateCanceled AutoUpgradeProfileProvisioningState = "Canceled"
// AutoUpgradeProfileProvisioningStateFailed - Resource creation failed.
AutoUpgradeProfileProvisioningStateFailed AutoUpgradeProfileProvisioningState = "Failed"
// AutoUpgradeProfileProvisioningStateSucceeded - Resource has been created.
AutoUpgradeProfileProvisioningStateSucceeded AutoUpgradeProfileProvisioningState = "Succeeded"
)
// PossibleAutoUpgradeProfileProvisioningStateValues returns the possible values for the AutoUpgradeProfileProvisioningState const type.
func PossibleAutoUpgradeProfileProvisioningStateValues() []AutoUpgradeProfileProvisioningState {
return []AutoUpgradeProfileProvisioningState{
AutoUpgradeProfileProvisioningStateCanceled,
AutoUpgradeProfileProvisioningStateFailed,
AutoUpgradeProfileProvisioningStateSucceeded,
}
}
// CreatedByType - The type of identity that created the resource.
type CreatedByType string
@ -183,6 +230,9 @@ const (
// is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17'
// for a node pool in cluster B in region Y, the system will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'.
NodeImageSelectionTypeConsistent NodeImageSelectionType = "Consistent"
// NodeImageSelectionTypeCustom - Upgrade the nodes to the custom image versions. When set, update run will use node image
// versions provided in customNodeImageVersions to upgrade the nodes. If set, customNodeImageVersions must not be empty.
NodeImageSelectionTypeCustom NodeImageSelectionType = "Custom"
// NodeImageSelectionTypeLatest - Use the latest image version when upgrading nodes. Clusters may use different image versions
// (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, the
// latest available version is different in different regions.
@ -193,6 +243,7 @@ const (
func PossibleNodeImageSelectionTypeValues() []NodeImageSelectionType {
return []NodeImageSelectionType{
NodeImageSelectionTypeConsistent,
NodeImageSelectionTypeCustom,
NodeImageSelectionTypeLatest,
}
}
@ -293,3 +344,28 @@ func PossibleUpdateStateValues() []UpdateState {
UpdateStateStopping,
}
}
// UpgradeChannel - Configuration of how auto upgrade will be run.
type UpgradeChannel string
const (
// UpgradeChannelNodeImage - Upgrade node image version of the clusters.
UpgradeChannelNodeImage UpgradeChannel = "NodeImage"
// UpgradeChannelRapid - Upgrades the clusters kubernetes version to the latest supported patch release on the latest supported
// minor version.
UpgradeChannelRapid UpgradeChannel = "Rapid"
// UpgradeChannelStable - Upgrades the clusters kubernetes version to the latest supported patch release on minor version
// N-1, where N is the latest supported minor version.
// For example, if a cluster runs version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, the cluster
// upgrades to 1.18.6.
UpgradeChannelStable UpgradeChannel = "Stable"
)
// PossibleUpgradeChannelValues returns the possible values for the UpgradeChannel const type.
func PossibleUpgradeChannelValues() []UpgradeChannel {
return []UpgradeChannel{
UpgradeChannelNodeImage,
UpgradeChannelRapid,
UpgradeChannelStable,
}
}

Просмотреть файл

@ -0,0 +1,288 @@
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package fake
import (
"context"
"errors"
"fmt"
azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet"
"net/http"
"net/url"
"regexp"
)
// AutoUpgradeProfilesServer is a fake server for instances of the armcontainerservicefleet.AutoUpgradeProfilesClient type.
type AutoUpgradeProfilesServer struct {
// BeginCreateOrUpdate is the fake for method AutoUpgradeProfilesClient.BeginCreateOrUpdate
// HTTP status codes to indicate success: http.StatusOK, http.StatusCreated
BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, resource armcontainerservicefleet.AutoUpgradeProfile, options *armcontainerservicefleet.AutoUpgradeProfilesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder)
// BeginDelete is the fake for method AutoUpgradeProfilesClient.BeginDelete
// HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent
BeginDelete func(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, options *armcontainerservicefleet.AutoUpgradeProfilesClientBeginDeleteOptions) (resp azfake.PollerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientDeleteResponse], errResp azfake.ErrorResponder)
// Get is the fake for method AutoUpgradeProfilesClient.Get
// HTTP status codes to indicate success: http.StatusOK
Get func(ctx context.Context, resourceGroupName string, fleetName string, autoUpgradeProfileName string, options *armcontainerservicefleet.AutoUpgradeProfilesClientGetOptions) (resp azfake.Responder[armcontainerservicefleet.AutoUpgradeProfilesClientGetResponse], errResp azfake.ErrorResponder)
// NewListByFleetPager is the fake for method AutoUpgradeProfilesClient.NewListByFleetPager
// HTTP status codes to indicate success: http.StatusOK
NewListByFleetPager func(resourceGroupName string, fleetName string, options *armcontainerservicefleet.AutoUpgradeProfilesClientListByFleetOptions) (resp azfake.PagerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientListByFleetResponse])
}
// NewAutoUpgradeProfilesServerTransport creates a new instance of AutoUpgradeProfilesServerTransport with the provided implementation.
// The returned AutoUpgradeProfilesServerTransport instance is connected to an instance of armcontainerservicefleet.AutoUpgradeProfilesClient via the
// azcore.ClientOptions.Transporter field in the client's constructor parameters.
func NewAutoUpgradeProfilesServerTransport(srv *AutoUpgradeProfilesServer) *AutoUpgradeProfilesServerTransport {
return &AutoUpgradeProfilesServerTransport{
srv: srv,
beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientCreateOrUpdateResponse]](),
beginDelete: newTracker[azfake.PollerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientDeleteResponse]](),
newListByFleetPager: newTracker[azfake.PagerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientListByFleetResponse]](),
}
}
// AutoUpgradeProfilesServerTransport connects instances of armcontainerservicefleet.AutoUpgradeProfilesClient to instances of AutoUpgradeProfilesServer.
// Don't use this type directly, use NewAutoUpgradeProfilesServerTransport instead.
type AutoUpgradeProfilesServerTransport struct {
srv *AutoUpgradeProfilesServer
beginCreateOrUpdate *tracker[azfake.PollerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientCreateOrUpdateResponse]]
beginDelete *tracker[azfake.PollerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientDeleteResponse]]
newListByFleetPager *tracker[azfake.PagerResponder[armcontainerservicefleet.AutoUpgradeProfilesClientListByFleetResponse]]
}
// Do implements the policy.Transporter interface for AutoUpgradeProfilesServerTransport.
func (a *AutoUpgradeProfilesServerTransport) Do(req *http.Request) (*http.Response, error) {
rawMethod := req.Context().Value(runtime.CtxAPINameKey{})
method, ok := rawMethod.(string)
if !ok {
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
}
var resp *http.Response
var err error
switch method {
case "AutoUpgradeProfilesClient.BeginCreateOrUpdate":
resp, err = a.dispatchBeginCreateOrUpdate(req)
case "AutoUpgradeProfilesClient.BeginDelete":
resp, err = a.dispatchBeginDelete(req)
case "AutoUpgradeProfilesClient.Get":
resp, err = a.dispatchGet(req)
case "AutoUpgradeProfilesClient.NewListByFleetPager":
resp, err = a.dispatchNewListByFleetPager(req)
default:
err = fmt.Errorf("unhandled API %s", method)
}
if err != nil {
return nil, err
}
return resp, nil
}
func (a *AutoUpgradeProfilesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) {
if a.srv.BeginCreateOrUpdate == nil {
return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")}
}
beginCreateOrUpdate := a.beginCreateOrUpdate.get(req)
if beginCreateOrUpdate == nil {
const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P<resourceGroupName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/fleets/(?P<fleetName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoUpgradeProfiles/(?P<autoUpgradeProfileName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
if matches == nil || len(matches) < 4 {
return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
}
body, err := server.UnmarshalRequestAsJSON[armcontainerservicefleet.AutoUpgradeProfile](req)
if err != nil {
return nil, err
}
resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")])
if err != nil {
return nil, err
}
ifMatchParam := getOptional(getHeaderValue(req.Header, "If-Match"))
ifNoneMatchParam := getOptional(getHeaderValue(req.Header, "If-None-Match"))
fleetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("fleetName")])
if err != nil {
return nil, err
}
autoUpgradeProfileNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("autoUpgradeProfileName")])
if err != nil {
return nil, err
}
var options *armcontainerservicefleet.AutoUpgradeProfilesClientBeginCreateOrUpdateOptions
if ifMatchParam != nil || ifNoneMatchParam != nil {
options = &armcontainerservicefleet.AutoUpgradeProfilesClientBeginCreateOrUpdateOptions{
IfMatch: ifMatchParam,
IfNoneMatch: ifNoneMatchParam,
}
}
respr, errRespr := a.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, fleetNameParam, autoUpgradeProfileNameParam, body, options)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
beginCreateOrUpdate = &respr
a.beginCreateOrUpdate.add(req, beginCreateOrUpdate)
}
resp, err := server.PollerResponderNext(beginCreateOrUpdate, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) {
a.beginCreateOrUpdate.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)}
}
if !server.PollerResponderMore(beginCreateOrUpdate) {
a.beginCreateOrUpdate.remove(req)
}
return resp, nil
}
func (a *AutoUpgradeProfilesServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) {
if a.srv.BeginDelete == nil {
return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")}
}
beginDelete := a.beginDelete.get(req)
if beginDelete == nil {
const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P<resourceGroupName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/fleets/(?P<fleetName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoUpgradeProfiles/(?P<autoUpgradeProfileName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
if matches == nil || len(matches) < 4 {
return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
}
resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")])
if err != nil {
return nil, err
}
ifMatchParam := getOptional(getHeaderValue(req.Header, "If-Match"))
fleetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("fleetName")])
if err != nil {
return nil, err
}
autoUpgradeProfileNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("autoUpgradeProfileName")])
if err != nil {
return nil, err
}
var options *armcontainerservicefleet.AutoUpgradeProfilesClientBeginDeleteOptions
if ifMatchParam != nil {
options = &armcontainerservicefleet.AutoUpgradeProfilesClientBeginDeleteOptions{
IfMatch: ifMatchParam,
}
}
respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, fleetNameParam, autoUpgradeProfileNameParam, options)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
beginDelete = &respr
a.beginDelete.add(req, beginDelete)
}
resp, err := server.PollerResponderNext(beginDelete, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
a.beginDelete.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
}
if !server.PollerResponderMore(beginDelete) {
a.beginDelete.remove(req)
}
return resp, nil
}
func (a *AutoUpgradeProfilesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) {
if a.srv.Get == nil {
return nil, &nonRetriableError{errors.New("fake for method Get not implemented")}
}
const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P<resourceGroupName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/fleets/(?P<fleetName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoUpgradeProfiles/(?P<autoUpgradeProfileName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
if matches == nil || len(matches) < 4 {
return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
}
resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")])
if err != nil {
return nil, err
}
fleetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("fleetName")])
if err != nil {
return nil, err
}
autoUpgradeProfileNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("autoUpgradeProfileName")])
if err != nil {
return nil, err
}
respr, errRespr := a.srv.Get(req.Context(), resourceGroupNameParam, fleetNameParam, autoUpgradeProfileNameParam, nil)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
respContent := server.GetResponseContent(respr)
if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
}
resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AutoUpgradeProfile, req)
if err != nil {
return nil, err
}
return resp, nil
}
func (a *AutoUpgradeProfilesServerTransport) dispatchNewListByFleetPager(req *http.Request) (*http.Response, error) {
if a.srv.NewListByFleetPager == nil {
return nil, &nonRetriableError{errors.New("fake for method NewListByFleetPager not implemented")}
}
newListByFleetPager := a.newListByFleetPager.get(req)
if newListByFleetPager == nil {
const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P<resourceGroupName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/fleets/(?P<fleetName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoUpgradeProfiles`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
if matches == nil || len(matches) < 3 {
return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
}
resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")])
if err != nil {
return nil, err
}
fleetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("fleetName")])
if err != nil {
return nil, err
}
resp := a.srv.NewListByFleetPager(resourceGroupNameParam, fleetNameParam, nil)
newListByFleetPager = &resp
a.newListByFleetPager.add(req, newListByFleetPager)
server.PagerResponderInjectNextLinks(newListByFleetPager, req, func(page *armcontainerservicefleet.AutoUpgradeProfilesClientListByFleetResponse, createLink func() string) {
page.NextLink = to.Ptr(createLink())
})
}
resp, err := server.PagerResponderNext(newListByFleetPager, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK}, resp.StatusCode) {
a.newListByFleetPager.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)}
}
if !server.PagerResponderMore(newListByFleetPager) {
a.newListByFleetPager.remove(req)
}
return resp, nil
}

Просмотреть файл

@ -19,6 +19,7 @@ import (
// ServerFactory is a fake server for instances of the armcontainerservicefleet.ClientFactory type.
type ServerFactory struct {
AutoUpgradeProfilesServer AutoUpgradeProfilesServer
FleetMembersServer FleetMembersServer
FleetUpdateStrategiesServer FleetUpdateStrategiesServer
FleetsServer FleetsServer
@ -40,6 +41,7 @@ func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport {
type ServerFactoryTransport struct {
srv *ServerFactory
trMu sync.Mutex
trAutoUpgradeProfilesServer *AutoUpgradeProfilesServerTransport
trFleetMembersServer *FleetMembersServerTransport
trFleetUpdateStrategiesServer *FleetUpdateStrategiesServerTransport
trFleetsServer *FleetsServerTransport
@ -60,6 +62,11 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) {
var err error
switch client {
case "AutoUpgradeProfilesClient":
initServer(s, &s.trAutoUpgradeProfilesServer, func() *AutoUpgradeProfilesServerTransport {
return NewAutoUpgradeProfilesServerTransport(&s.srv.AutoUpgradeProfilesServer)
})
resp, err = s.trAutoUpgradeProfilesServer.Do(req)
case "FleetMembersClient":
initServer(s, &s.trFleetMembersServer, func() *FleetMembersServerTransport { return NewFleetMembersServerTransport(&s.srv.FleetMembersServer) })
resp, err = s.trFleetMembersServer.Do(req)

Просмотреть файл

@ -46,7 +46,7 @@ func NewFleetMembersClient(subscriptionID string, credential azcore.TokenCredent
// BeginCreate - Create a FleetMember
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - fleetMemberName - The name of the Fleet member resource.
@ -74,7 +74,7 @@ func (client *FleetMembersClient) BeginCreate(ctx context.Context, resourceGroup
// Create - Create a FleetMember
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *FleetMembersClient) create(ctx context.Context, resourceGroupName string, fleetName string, fleetMemberName string, resource FleetMember, options *FleetMembersClientBeginCreateOptions) (*http.Response, error) {
var err error
const operationName = "FleetMembersClient.BeginCreate"
@ -120,7 +120,7 @@ func (client *FleetMembersClient) createCreateRequest(ctx context.Context, resou
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -138,7 +138,7 @@ func (client *FleetMembersClient) createCreateRequest(ctx context.Context, resou
// BeginDelete - Delete a FleetMember
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - fleetMemberName - The name of the Fleet member resource.
@ -165,7 +165,7 @@ func (client *FleetMembersClient) BeginDelete(ctx context.Context, resourceGroup
// Delete - Delete a FleetMember
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *FleetMembersClient) deleteOperation(ctx context.Context, resourceGroupName string, fleetName string, fleetMemberName string, options *FleetMembersClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "FleetMembersClient.BeginDelete"
@ -211,7 +211,7 @@ func (client *FleetMembersClient) deleteCreateRequest(ctx context.Context, resou
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -223,7 +223,7 @@ func (client *FleetMembersClient) deleteCreateRequest(ctx context.Context, resou
// Get - Get a FleetMember
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - fleetMemberName - The name of the Fleet member resource.
@ -274,7 +274,7 @@ func (client *FleetMembersClient) getCreateRequest(ctx context.Context, resource
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -291,7 +291,7 @@ func (client *FleetMembersClient) getHandleResponse(resp *http.Response) (FleetM
// NewListByFleetPager - List FleetMember resources by Fleet
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - options - FleetMembersClientListByFleetOptions contains the optional parameters for the FleetMembersClient.NewListByFleetPager
@ -339,7 +339,7 @@ func (client *FleetMembersClient) listByFleetCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -357,7 +357,7 @@ func (client *FleetMembersClient) listByFleetHandleResponse(resp *http.Response)
// BeginUpdate - Update a FleetMember
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - fleetMemberName - The name of the Fleet member resource.
@ -385,7 +385,7 @@ func (client *FleetMembersClient) BeginUpdate(ctx context.Context, resourceGroup
// Update - Update a FleetMember
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *FleetMembersClient) update(ctx context.Context, resourceGroupName string, fleetName string, fleetMemberName string, properties FleetMemberUpdate, options *FleetMembersClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "FleetMembersClient.BeginUpdate"
@ -431,7 +431,7 @@ func (client *FleetMembersClient) updateCreateRequest(ctx context.Context, resou
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {

Просмотреть файл

@ -18,7 +18,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/FleetMembers_ListByFleet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_ListByFleet.json
func ExampleFleetMembersClient_NewListByFleetPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -64,7 +64,7 @@ func ExampleFleetMembersClient_NewListByFleetPager() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/FleetMembers_Get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Get.json
func ExampleFleetMembersClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -102,7 +102,7 @@ func ExampleFleetMembersClient_Get() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/FleetMembers_Create.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Create.json
func ExampleFleetMembersClient_BeginCreate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -150,7 +150,7 @@ func ExampleFleetMembersClient_BeginCreate() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/FleetMembers_Update.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Update.json
func ExampleFleetMembersClient_BeginUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -197,7 +197,7 @@ func ExampleFleetMembersClient_BeginUpdate() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/FleetMembers_Delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/FleetMembers_Delete.json
func ExampleFleetMembersClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

Просмотреть файл

@ -46,7 +46,7 @@ func NewFleetsClient(subscriptionID string, credential azcore.TokenCredential, o
// BeginCreateOrUpdate - Creates or updates a Fleet.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - resource - Resource create parameters.
@ -73,7 +73,7 @@ func (client *FleetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGro
// CreateOrUpdate - Creates or updates a Fleet.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *FleetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, resource Fleet, options *FleetsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "FleetsClient.BeginCreateOrUpdate"
@ -115,7 +115,7 @@ func (client *FleetsClient) createOrUpdateCreateRequest(ctx context.Context, res
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -133,7 +133,7 @@ func (client *FleetsClient) createOrUpdateCreateRequest(ctx context.Context, res
// BeginDelete - Delete a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - options - FleetsClientBeginDeleteOptions contains the optional parameters for the FleetsClient.BeginDelete method.
@ -158,7 +158,7 @@ func (client *FleetsClient) BeginDelete(ctx context.Context, resourceGroupName s
// Delete - Delete a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *FleetsClient) deleteOperation(ctx context.Context, resourceGroupName string, fleetName string, options *FleetsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "FleetsClient.BeginDelete"
@ -200,7 +200,7 @@ func (client *FleetsClient) deleteCreateRequest(ctx context.Context, resourceGro
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -212,7 +212,7 @@ func (client *FleetsClient) deleteCreateRequest(ctx context.Context, resourceGro
// Get - Gets a Fleet.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - options - FleetsClientGetOptions contains the optional parameters for the FleetsClient.Get method.
@ -258,7 +258,7 @@ func (client *FleetsClient) getCreateRequest(ctx context.Context, resourceGroupN
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -275,7 +275,7 @@ func (client *FleetsClient) getHandleResponse(resp *http.Response) (FleetsClient
// NewListByResourceGroupPager - Lists fleets in the specified subscription and resource group.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - options - FleetsClientListByResourceGroupOptions contains the optional parameters for the FleetsClient.NewListByResourceGroupPager
// method.
@ -318,7 +318,7 @@ func (client *FleetsClient) listByResourceGroupCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -335,7 +335,7 @@ func (client *FleetsClient) listByResourceGroupHandleResponse(resp *http.Respons
// NewListBySubscriptionPager - Lists fleets in the specified subscription.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - options - FleetsClientListBySubscriptionOptions contains the optional parameters for the FleetsClient.NewListBySubscriptionPager
// method.
func (client *FleetsClient) NewListBySubscriptionPager(options *FleetsClientListBySubscriptionOptions) *runtime.Pager[FleetsClientListBySubscriptionResponse] {
@ -373,7 +373,7 @@ func (client *FleetsClient) listBySubscriptionCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -391,7 +391,7 @@ func (client *FleetsClient) listBySubscriptionHandleResponse(resp *http.Response
// ListCredentials - Lists the user credentials of a Fleet.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - options - FleetsClientListCredentialsOptions contains the optional parameters for the FleetsClient.ListCredentials method.
@ -437,7 +437,7 @@ func (client *FleetsClient) listCredentialsCreateRequest(ctx context.Context, re
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -455,7 +455,7 @@ func (client *FleetsClient) listCredentialsHandleResponse(resp *http.Response) (
// BeginUpdate - Update a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - properties - The resource properties to be updated.
@ -481,7 +481,7 @@ func (client *FleetsClient) BeginUpdate(ctx context.Context, resourceGroupName s
// Update - Update a Fleet
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *FleetsClient) update(ctx context.Context, resourceGroupName string, fleetName string, properties FleetPatch, options *FleetsClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "FleetsClient.BeginUpdate"
@ -523,7 +523,7 @@ func (client *FleetsClient) updateCreateRequest(ctx context.Context, resourceGro
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {

Просмотреть файл

@ -18,7 +18,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/Fleets_ListBySub.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_ListBySub.json
func ExampleFleetsClient_NewListBySubscriptionPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -77,7 +77,7 @@ func ExampleFleetsClient_NewListBySubscriptionPager() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/Fleets_ListByResourceGroup.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_ListByResourceGroup.json
func ExampleFleetsClient_NewListByResourceGroupPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -136,7 +136,7 @@ func ExampleFleetsClient_NewListByResourceGroupPager() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/Fleets_Get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_Get.json
func ExampleFleetsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -187,7 +187,7 @@ func ExampleFleetsClient_Get() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/Fleets_CreateOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_CreateOrUpdate.json
func ExampleFleetsClient_BeginCreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -258,7 +258,7 @@ func ExampleFleetsClient_BeginCreateOrUpdate() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/Fleets_PatchTags.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_PatchTags.json
func ExampleFleetsClient_BeginUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -318,7 +318,7 @@ func ExampleFleetsClient_BeginUpdate() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/Fleets_Delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_Delete.json
func ExampleFleetsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -339,7 +339,7 @@ func ExampleFleetsClient_BeginDelete() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/Fleets_ListCredentialsResult.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Fleets_ListCredentialsResult.json
func ExampleFleetsClient_ListCredentials() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

Просмотреть файл

@ -46,7 +46,7 @@ func NewFleetUpdateStrategiesClient(subscriptionID string, credential azcore.Tok
// BeginCreateOrUpdate - Create a FleetUpdateStrategy
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateStrategyName - The name of the UpdateStrategy resource.
@ -74,7 +74,7 @@ func (client *FleetUpdateStrategiesClient) BeginCreateOrUpdate(ctx context.Conte
// CreateOrUpdate - Create a FleetUpdateStrategy
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *FleetUpdateStrategiesClient) createOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, updateStrategyName string, resource FleetUpdateStrategy, options *FleetUpdateStrategiesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "FleetUpdateStrategiesClient.BeginCreateOrUpdate"
@ -120,7 +120,7 @@ func (client *FleetUpdateStrategiesClient) createOrUpdateCreateRequest(ctx conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -138,7 +138,7 @@ func (client *FleetUpdateStrategiesClient) createOrUpdateCreateRequest(ctx conte
// BeginDelete - Delete a FleetUpdateStrategy
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateStrategyName - The name of the UpdateStrategy resource.
@ -165,7 +165,7 @@ func (client *FleetUpdateStrategiesClient) BeginDelete(ctx context.Context, reso
// Delete - Delete a FleetUpdateStrategy
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *FleetUpdateStrategiesClient) deleteOperation(ctx context.Context, resourceGroupName string, fleetName string, updateStrategyName string, options *FleetUpdateStrategiesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "FleetUpdateStrategiesClient.BeginDelete"
@ -211,7 +211,7 @@ func (client *FleetUpdateStrategiesClient) deleteCreateRequest(ctx context.Conte
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -223,7 +223,7 @@ func (client *FleetUpdateStrategiesClient) deleteCreateRequest(ctx context.Conte
// Get - Get a FleetUpdateStrategy
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateStrategyName - The name of the UpdateStrategy resource.
@ -275,7 +275,7 @@ func (client *FleetUpdateStrategiesClient) getCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -292,7 +292,7 @@ func (client *FleetUpdateStrategiesClient) getHandleResponse(resp *http.Response
// NewListByFleetPager - List FleetUpdateStrategy resources by Fleet
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - options - FleetUpdateStrategiesClientListByFleetOptions contains the optional parameters for the FleetUpdateStrategiesClient.NewListByFleetPager
@ -340,7 +340,7 @@ func (client *FleetUpdateStrategiesClient) listByFleetCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

Просмотреть файл

@ -18,7 +18,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateStrategies_ListByFleet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_ListByFleet.json
func ExampleFleetUpdateStrategiesClient_NewListByFleetPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -74,7 +74,7 @@ func ExampleFleetUpdateStrategiesClient_NewListByFleetPager() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateStrategies_Get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_Get.json
func ExampleFleetUpdateStrategiesClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -122,7 +122,7 @@ func ExampleFleetUpdateStrategiesClient_Get() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateStrategies_CreateOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_CreateOrUpdate.json
func ExampleFleetUpdateStrategiesClient_BeginCreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -190,7 +190,7 @@ func ExampleFleetUpdateStrategiesClient_BeginCreateOrUpdate() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateStrategies_Delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateStrategies_Delete.json
func ExampleFleetUpdateStrategiesClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

Просмотреть файл

@ -14,6 +14,12 @@ import "time"
type APIServerAccessProfile struct {
// Whether to create the Fleet hub as a private cluster or not.
EnablePrivateCluster *bool
// Whether to enable apiserver vnet integration for the Fleet hub or not.
EnableVnetIntegration *bool
// The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet.
SubnetID *string
}
// AgentProfile - Agent profile for the Fleet hub.
@ -26,6 +32,67 @@ type AgentProfile struct {
VMSize *string
}
// AutoUpgradeNodeImageSelection - The node image upgrade to be applied to the target clusters in auto upgrade.
type AutoUpgradeNodeImageSelection struct {
// REQUIRED; The node image upgrade type.
Type *AutoUpgradeNodeImageSelectionType
}
// AutoUpgradeProfile - The AutoUpgradeProfile resource.
type AutoUpgradeProfile struct {
// The resource-specific properties for this resource.
Properties *AutoUpgradeProfileProperties
// READ-ONLY; If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.
// Entity tags are used for comparing two or more entities from the same requested resource.
// HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range
// (section 14.27) header fields.
ETag *string
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
// AutoUpgradeProfileListResult - The response of a AutoUpgradeProfile list operation.
type AutoUpgradeProfileListResult struct {
// REQUIRED; The AutoUpgradeProfile items on this page
Value []*AutoUpgradeProfile
// The link to the next page of items
NextLink *string
}
// AutoUpgradeProfileProperties - The properties of the AutoUpgradeProfile.
type AutoUpgradeProfileProperties struct {
// REQUIRED; Configures how auto-upgrade will be run.
Channel *UpgradeChannel
// If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule. If set to True: the
// auto upgrade has no effect - no upgrade will be run on the target managed
// clusters. This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile.
// By default, this is set to False.
Disabled *bool
// The node image upgrade to be applied to the target clusters in auto upgrade.
NodeImageSelection *AutoUpgradeNodeImageSelection
// The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters
// which are members of the fleet.
UpdateStrategyID *string
// READ-ONLY; The provisioning state of the AutoUpgradeProfile resource.
ProvisioningState *AutoUpgradeProfileProvisioningState
}
// ErrorAdditionalInfo - The resource management error additional info.
type ErrorAdditionalInfo struct {
// READ-ONLY; The additional info.
@ -179,7 +246,7 @@ type FleetMemberProperties struct {
// FleetMemberUpdate - The type used for update operations of the FleetMember.
type FleetMemberUpdate struct {
// The updatable properties of the FleetMember.
// The resource-specific properties for this resource.
Properties *FleetMemberUpdateProperties
}
@ -309,6 +376,13 @@ type MemberUpdateStatus struct {
type NodeImageSelection struct {
// REQUIRED; The node image upgrade type.
Type *NodeImageSelectionType
// Custom node image versions to upgrade the nodes to. This field is required if node image selection type is Custom. Otherwise,
// it must be empty. For each node image family (e.g.,
// 'AKSUbuntu-1804gen2containerd'), this field can contain at most one version (e.g., only one of 'AKSUbuntu-1804gen2containerd-2023.01.12'
// or 'AKSUbuntu-1804gen2containerd-2023.02.12', not both). If the
// nodes belong to a family without a matching image version in this field, they are not upgraded.
CustomNodeImageVersions []*NodeImageVersion
}
// NodeImageSelectionStatus - The node image upgrade specs for the update run.

Просмотреть файл

@ -20,6 +20,8 @@ import (
func (a APIServerAccessProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "enablePrivateCluster", a.EnablePrivateCluster)
populate(objectMap, "enableVnetIntegration", a.EnableVnetIntegration)
populate(objectMap, "subnetId", a.SubnetID)
return json.Marshal(objectMap)
}
@ -35,6 +37,12 @@ func (a *APIServerAccessProfile) UnmarshalJSON(data []byte) error {
case "enablePrivateCluster":
err = unpopulate(val, "EnablePrivateCluster", &a.EnablePrivateCluster)
delete(rawMsg, key)
case "enableVnetIntegration":
err = unpopulate(val, "EnableVnetIntegration", &a.EnableVnetIntegration)
delete(rawMsg, key)
case "subnetId":
err = unpopulate(val, "SubnetID", &a.SubnetID)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
@ -74,6 +82,154 @@ func (a *AgentProfile) UnmarshalJSON(data []byte) error {
return nil
}
// MarshalJSON implements the json.Marshaller interface for type AutoUpgradeNodeImageSelection.
func (a AutoUpgradeNodeImageSelection) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "type", a.Type)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type AutoUpgradeNodeImageSelection.
func (a *AutoUpgradeNodeImageSelection) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "type":
err = unpopulate(val, "Type", &a.Type)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type AutoUpgradeProfile.
func (a AutoUpgradeProfile) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "eTag", a.ETag)
populate(objectMap, "id", a.ID)
populate(objectMap, "name", a.Name)
populate(objectMap, "properties", a.Properties)
populate(objectMap, "systemData", a.SystemData)
populate(objectMap, "type", a.Type)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type AutoUpgradeProfile.
func (a *AutoUpgradeProfile) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "eTag":
err = unpopulate(val, "ETag", &a.ETag)
delete(rawMsg, key)
case "id":
err = unpopulate(val, "ID", &a.ID)
delete(rawMsg, key)
case "name":
err = unpopulate(val, "Name", &a.Name)
delete(rawMsg, key)
case "properties":
err = unpopulate(val, "Properties", &a.Properties)
delete(rawMsg, key)
case "systemData":
err = unpopulate(val, "SystemData", &a.SystemData)
delete(rawMsg, key)
case "type":
err = unpopulate(val, "Type", &a.Type)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type AutoUpgradeProfileListResult.
func (a AutoUpgradeProfileListResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "nextLink", a.NextLink)
populate(objectMap, "value", a.Value)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type AutoUpgradeProfileListResult.
func (a *AutoUpgradeProfileListResult) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "nextLink":
err = unpopulate(val, "NextLink", &a.NextLink)
delete(rawMsg, key)
case "value":
err = unpopulate(val, "Value", &a.Value)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type AutoUpgradeProfileProperties.
func (a AutoUpgradeProfileProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "channel", a.Channel)
populate(objectMap, "disabled", a.Disabled)
populate(objectMap, "nodeImageSelection", a.NodeImageSelection)
populate(objectMap, "provisioningState", a.ProvisioningState)
populate(objectMap, "updateStrategyId", a.UpdateStrategyID)
return json.Marshal(objectMap)
}
// UnmarshalJSON implements the json.Unmarshaller interface for type AutoUpgradeProfileProperties.
func (a *AutoUpgradeProfileProperties) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "channel":
err = unpopulate(val, "Channel", &a.Channel)
delete(rawMsg, key)
case "disabled":
err = unpopulate(val, "Disabled", &a.Disabled)
delete(rawMsg, key)
case "nodeImageSelection":
err = unpopulate(val, "NodeImageSelection", &a.NodeImageSelection)
delete(rawMsg, key)
case "provisioningState":
err = unpopulate(val, "ProvisioningState", &a.ProvisioningState)
delete(rawMsg, key)
case "updateStrategyId":
err = unpopulate(val, "UpdateStrategyID", &a.UpdateStrategyID)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", a, err)
}
}
return nil
}
// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@ -832,6 +988,7 @@ func (m *MemberUpdateStatus) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type NodeImageSelection.
func (n NodeImageSelection) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "customNodeImageVersions", n.CustomNodeImageVersions)
populate(objectMap, "type", n.Type)
return json.Marshal(objectMap)
}
@ -845,6 +1002,9 @@ func (n *NodeImageSelection) UnmarshalJSON(data []byte) error {
for key, val := range rawMsg {
var err error
switch key {
case "customNodeImageVersions":
err = unpopulate(val, "CustomNodeImageVersions", &n.CustomNodeImageVersions)
delete(rawMsg, key)
case "type":
err = unpopulate(val, "Type", &n.Type)
delete(rawMsg, key)

Просмотреть файл

@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO
// NewListPager - List the operations for the provider
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - 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]{
@ -72,7 +72,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options *
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

Просмотреть файл

@ -17,7 +17,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/Operations_List.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/Operations_List.json
func ExampleOperationsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

Просмотреть файл

@ -8,6 +8,40 @@
package armcontainerservicefleet
// AutoUpgradeProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the AutoUpgradeProfilesClient.BeginCreateOrUpdate
// method.
type AutoUpgradeProfilesClientBeginCreateOrUpdateOptions struct {
// The request should only proceed if an entity matches this string.
IfMatch *string
// The request should only proceed if no entity matches this string.
IfNoneMatch *string
// Resumes the LRO from the provided token.
ResumeToken string
}
// AutoUpgradeProfilesClientBeginDeleteOptions contains the optional parameters for the AutoUpgradeProfilesClient.BeginDelete
// method.
type AutoUpgradeProfilesClientBeginDeleteOptions struct {
// The request should only proceed if an entity matches this string.
IfMatch *string
// Resumes the LRO from the provided token.
ResumeToken string
}
// AutoUpgradeProfilesClientGetOptions contains the optional parameters for the AutoUpgradeProfilesClient.Get method.
type AutoUpgradeProfilesClientGetOptions struct {
// placeholder for future optional parameters
}
// AutoUpgradeProfilesClientListByFleetOptions contains the optional parameters for the AutoUpgradeProfilesClient.NewListByFleetPager
// method.
type AutoUpgradeProfilesClientListByFleetOptions struct {
// placeholder for future optional parameters
}
// FleetMembersClientBeginCreateOptions contains the optional parameters for the FleetMembersClient.BeginCreate method.
type FleetMembersClientBeginCreateOptions struct {
// The request should only proceed if an entity matches this string.

Просмотреть файл

@ -8,6 +8,29 @@
package armcontainerservicefleet
// AutoUpgradeProfilesClientCreateOrUpdateResponse contains the response from method AutoUpgradeProfilesClient.BeginCreateOrUpdate.
type AutoUpgradeProfilesClientCreateOrUpdateResponse struct {
// The AutoUpgradeProfile resource.
AutoUpgradeProfile
}
// AutoUpgradeProfilesClientDeleteResponse contains the response from method AutoUpgradeProfilesClient.BeginDelete.
type AutoUpgradeProfilesClientDeleteResponse struct {
// placeholder for future response values
}
// AutoUpgradeProfilesClientGetResponse contains the response from method AutoUpgradeProfilesClient.Get.
type AutoUpgradeProfilesClientGetResponse struct {
// The AutoUpgradeProfile resource.
AutoUpgradeProfile
}
// AutoUpgradeProfilesClientListByFleetResponse contains the response from method AutoUpgradeProfilesClient.NewListByFleetPager.
type AutoUpgradeProfilesClientListByFleetResponse struct {
// The response of a AutoUpgradeProfile list operation.
AutoUpgradeProfileListResult
}
// FleetMembersClientCreateResponse contains the response from method FleetMembersClient.BeginCreate.
type FleetMembersClientCreateResponse struct {
// A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure.

Просмотреть файл

@ -46,7 +46,7 @@ func NewUpdateRunsClient(subscriptionID string, credential azcore.TokenCredentia
// BeginCreateOrUpdate - Create a UpdateRun
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateRunName - The name of the UpdateRun resource.
@ -74,7 +74,7 @@ func (client *UpdateRunsClient) BeginCreateOrUpdate(ctx context.Context, resourc
// CreateOrUpdate - Create a UpdateRun
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *UpdateRunsClient) createOrUpdate(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, resource UpdateRun, options *UpdateRunsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
var err error
const operationName = "UpdateRunsClient.BeginCreateOrUpdate"
@ -120,7 +120,7 @@ func (client *UpdateRunsClient) createOrUpdateCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -138,7 +138,7 @@ func (client *UpdateRunsClient) createOrUpdateCreateRequest(ctx context.Context,
// BeginDelete - Delete a UpdateRun
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateRunName - The name of the UpdateRun resource.
@ -164,7 +164,7 @@ func (client *UpdateRunsClient) BeginDelete(ctx context.Context, resourceGroupNa
// Delete - Delete a UpdateRun
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *UpdateRunsClient) deleteOperation(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, options *UpdateRunsClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "UpdateRunsClient.BeginDelete"
@ -210,7 +210,7 @@ func (client *UpdateRunsClient) deleteCreateRequest(ctx context.Context, resourc
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -222,7 +222,7 @@ func (client *UpdateRunsClient) deleteCreateRequest(ctx context.Context, resourc
// Get - Get a UpdateRun
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateRunName - The name of the UpdateRun resource.
@ -273,7 +273,7 @@ func (client *UpdateRunsClient) getCreateRequest(ctx context.Context, resourceGr
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -290,7 +290,7 @@ func (client *UpdateRunsClient) getHandleResponse(resp *http.Response) (UpdateRu
// NewListByFleetPager - List UpdateRun resources by Fleet
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - options - UpdateRunsClientListByFleetOptions contains the optional parameters for the UpdateRunsClient.NewListByFleetPager
@ -338,7 +338,7 @@ func (client *UpdateRunsClient) listByFleetCreateRequest(ctx context.Context, re
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -356,7 +356,7 @@ func (client *UpdateRunsClient) listByFleetHandleResponse(resp *http.Response) (
// BeginSkip - Skips one or a combination of member/group/stage/afterStageWait(s) of an update run.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateRunName - The name of the UpdateRun resource.
@ -383,7 +383,7 @@ func (client *UpdateRunsClient) BeginSkip(ctx context.Context, resourceGroupName
// Skip - Skips one or a combination of member/group/stage/afterStageWait(s) of an update run.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *UpdateRunsClient) skip(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, body SkipProperties, options *UpdateRunsClientBeginSkipOptions) (*http.Response, error) {
var err error
const operationName = "UpdateRunsClient.BeginSkip"
@ -429,7 +429,7 @@ func (client *UpdateRunsClient) skipCreateRequest(ctx context.Context, resourceG
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -444,7 +444,7 @@ func (client *UpdateRunsClient) skipCreateRequest(ctx context.Context, resourceG
// BeginStart - Starts an UpdateRun.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateRunName - The name of the UpdateRun resource.
@ -470,7 +470,7 @@ func (client *UpdateRunsClient) BeginStart(ctx context.Context, resourceGroupNam
// Start - Starts an UpdateRun.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *UpdateRunsClient) start(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, options *UpdateRunsClientBeginStartOptions) (*http.Response, error) {
var err error
const operationName = "UpdateRunsClient.BeginStart"
@ -516,7 +516,7 @@ func (client *UpdateRunsClient) startCreateRequest(ctx context.Context, resource
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -528,7 +528,7 @@ func (client *UpdateRunsClient) startCreateRequest(ctx context.Context, resource
// BeginStop - Stops an UpdateRun.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - fleetName - The name of the Fleet resource.
// - updateRunName - The name of the UpdateRun resource.
@ -554,7 +554,7 @@ func (client *UpdateRunsClient) BeginStop(ctx context.Context, resourceGroupName
// Stop - Stops an UpdateRun.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-04-01
// Generated from API version 2024-05-02-preview
func (client *UpdateRunsClient) stop(ctx context.Context, resourceGroupName string, fleetName string, updateRunName string, options *UpdateRunsClientBeginStopOptions) (*http.Response, error) {
var err error
const operationName = "UpdateRunsClient.BeginStop"
@ -600,7 +600,7 @@ func (client *UpdateRunsClient) stopCreateRequest(ctx context.Context, resourceG
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-04-01")
reqQP.Set("api-version", "2024-05-02-preview")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {

Просмотреть файл

@ -18,7 +18,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicefleet/armcontainerservicefleet"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateRuns_ListByFleet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_ListByFleet.json
func ExampleUpdateRunsClient_NewListByFleetPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -116,7 +116,7 @@ func ExampleUpdateRunsClient_NewListByFleetPager() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateRuns_Get.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Get.json
func ExampleUpdateRunsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -206,7 +206,7 @@ func ExampleUpdateRunsClient_Get() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateRuns_CreateOrUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_CreateOrUpdate.json
func ExampleUpdateRunsClient_BeginCreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -327,7 +327,7 @@ func ExampleUpdateRunsClient_BeginCreateOrUpdate() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateRuns_Delete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Delete.json
func ExampleUpdateRunsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -348,7 +348,7 @@ func ExampleUpdateRunsClient_BeginDelete() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateRuns_Skip.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Skip.json
func ExampleUpdateRunsClient_BeginSkip() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -473,7 +473,7 @@ func ExampleUpdateRunsClient_BeginSkip() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateRuns_Start.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Start.json
func ExampleUpdateRunsClient_BeginStart() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -570,7 +570,7 @@ func ExampleUpdateRunsClient_BeginStart() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2024-04-01/examples/UpdateRuns_Stop.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ad60d7f8eba124edc6999677c55aba2184e303b0/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/examples/UpdateRuns_Stop.json
func ExampleUpdateRunsClient_BeginStop() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {