diff --git a/sdk/resourcemanager/batch/armbatch/CHANGELOG.md b/sdk/resourcemanager/batch/armbatch/CHANGELOG.md index be4c37dbdbb8..49073d839933 100644 --- a/sdk/resourcemanager/batch/armbatch/CHANGELOG.md +++ b/sdk/resourcemanager/batch/armbatch/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 2.2.0 (2023-12-22) +### Features Added + +- New value `StorageAccountTypeStandardSSDLRS` added to enum type `StorageAccountType` +- New struct `ManagedDisk` +- New struct `SecurityProfile` +- New struct `ServiceArtifactReference` +- New struct `UefiSettings` +- New field `Caching`, `DiskSizeGB`, `ManagedDisk`, `WriteAcceleratorEnabled` in struct `OSDisk` +- New field `ResourceTags` in struct `PoolProperties` +- New field `SecurityProfile`, `ServiceArtifactReference` in struct `VirtualMachineConfiguration` + + ## 2.1.0 (2023-11-24) ### Features Added diff --git a/sdk/resourcemanager/batch/armbatch/account_client.go b/sdk/resourcemanager/batch/armbatch/account_client.go index bb20c7c05abb..6b8aa1f05429 100644 --- a/sdk/resourcemanager/batch/armbatch/account_client.go +++ b/sdk/resourcemanager/batch/armbatch/account_client.go @@ -47,7 +47,7 @@ func NewAccountClient(subscriptionID string, credential azcore.TokenCredential, // API and should instead be updated with the Update Batch Account API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - A name for the Batch account which must be unique within the region. Batch account names must be between // 3 and 24 characters in length and must use only numbers and lowercase letters. This name is @@ -77,7 +77,7 @@ func (client *AccountClient) BeginCreate(ctx context.Context, resourceGroupName // should instead be updated with the Update Batch Account API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 func (client *AccountClient) create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters, options *AccountClientBeginCreateOptions) (*http.Response, error) { var err error const operationName = "AccountClient.BeginCreate" @@ -119,7 +119,7 @@ func (client *AccountClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -131,7 +131,7 @@ func (client *AccountClient) createCreateRequest(ctx context.Context, resourceGr // BeginDelete - Deletes the specified Batch account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - AccountClientBeginDeleteOptions contains the optional parameters for the AccountClient.BeginDelete method. @@ -156,7 +156,7 @@ func (client *AccountClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes the specified Batch account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 func (client *AccountClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *AccountClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "AccountClient.BeginDelete" @@ -198,7 +198,7 @@ func (client *AccountClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,7 +207,7 @@ func (client *AccountClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets information about the specified Batch account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - AccountClientGetOptions contains the optional parameters for the AccountClient.Get method. @@ -253,7 +253,7 @@ func (client *AccountClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -271,7 +271,7 @@ func (client *AccountClient) getHandleResponse(resp *http.Response) (AccountClie // GetDetector - Gets information about the given detector for a given Batch account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - detectorID - The name of the detector. @@ -322,7 +322,7 @@ func (client *AccountClient) getDetectorCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -343,7 +343,7 @@ func (client *AccountClient) getDetectorHandleResponse(resp *http.Response) (Acc // will fail. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - AccountClientGetKeysOptions contains the optional parameters for the AccountClient.GetKeys method. @@ -389,7 +389,7 @@ func (client *AccountClient) getKeysCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -406,7 +406,7 @@ func (client *AccountClient) getKeysHandleResponse(resp *http.Response) (Account // NewListPager - Gets information about the Batch accounts associated with the subscription. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - options - AccountClientListOptions contains the optional parameters for the AccountClient.NewListPager method. func (client *AccountClient) NewListPager(options *AccountClientListOptions) *runtime.Pager[AccountClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AccountClientListResponse]{ @@ -443,7 +443,7 @@ func (client *AccountClient) listCreateRequest(ctx context.Context, options *Acc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -460,7 +460,7 @@ func (client *AccountClient) listHandleResponse(resp *http.Response) (AccountCli // NewListByResourceGroupPager - Gets information about the Batch accounts associated with the specified resource group. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - options - AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.NewListByResourceGroupPager // method. @@ -503,7 +503,7 @@ func (client *AccountClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -520,7 +520,7 @@ func (client *AccountClient) listByResourceGroupHandleResponse(resp *http.Respon // NewListDetectorsPager - Gets information about the detectors available for a given Batch account. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - AccountClientListDetectorsOptions contains the optional parameters for the AccountClient.NewListDetectorsPager @@ -568,7 +568,7 @@ func (client *AccountClient) listDetectorsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -590,7 +590,7 @@ func (client *AccountClient) listDetectorsHandleResponse(resp *http.Response) (A // Batch to mark the affected nodes as unusable. For more information about // creating a pool inside of a virtual network, see https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - AccountClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the AccountClient.NewListOutboundNetworkDependenciesEndpointsPager @@ -638,7 +638,7 @@ func (client *AccountClient) listOutboundNetworkDependenciesEndpointsCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -659,7 +659,7 @@ func (client *AccountClient) listOutboundNetworkDependenciesEndpointsHandleRespo // keys will fail. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - parameters - The type of key to regenerate. @@ -706,7 +706,7 @@ func (client *AccountClient) regenerateKeyCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -728,7 +728,7 @@ func (client *AccountClient) regenerateKeyHandleResponse(resp *http.Response) (A // only if storage key authentication is being used. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - AccountClientSynchronizeAutoStorageKeysOptions contains the optional parameters for the AccountClient.SynchronizeAutoStorageKeys @@ -774,7 +774,7 @@ func (client *AccountClient) synchronizeAutoStorageKeysCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -783,7 +783,7 @@ func (client *AccountClient) synchronizeAutoStorageKeysCreateRequest(ctx context // Update - Updates the properties of an existing Batch account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - parameters - Additional parameters for account update. @@ -830,7 +830,7 @@ func (client *AccountClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/account_client_example_test.go b/sdk/resourcemanager/batch/armbatch/account_client_example_test.go index 8e86dc319cf2..beb46cd9811f 100644 --- a/sdk/resourcemanager/batch/armbatch/account_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/account_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_BYOS.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountCreate_BYOS.json func ExampleAccountClient_BeginCreate_batchAccountCreateByos() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleAccountClient_BeginCreate_batchAccountCreateByos() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_Default.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountCreate_Default.json func ExampleAccountClient_BeginCreate_batchAccountCreateDefault() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -135,7 +135,7 @@ func ExampleAccountClient_BeginCreate_batchAccountCreateDefault() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_SystemAssignedIdentity.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountCreate_SystemAssignedIdentity.json func ExampleAccountClient_BeginCreate_batchAccountCreateSystemAssignedIdentity() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -194,7 +194,7 @@ func ExampleAccountClient_BeginCreate_batchAccountCreateSystemAssignedIdentity() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_UserAssignedIdentity.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountCreate_UserAssignedIdentity.json func ExampleAccountClient_BeginCreate_batchAccountCreateUserAssignedIdentity() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -260,7 +260,7 @@ func ExampleAccountClient_BeginCreate_batchAccountCreateUserAssignedIdentity() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateBatchAccountCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateBatchAccountCreate.json func ExampleAccountClient_BeginCreate_privateBatchAccountCreate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -323,7 +323,7 @@ func ExampleAccountClient_BeginCreate_privateBatchAccountCreate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountUpdate.json func ExampleAccountClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -372,7 +372,7 @@ func ExampleAccountClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountDelete.json func ExampleAccountClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -393,7 +393,7 @@ func ExampleAccountClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountGet.json func ExampleAccountClient_Get_batchAccountGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -436,7 +436,7 @@ func ExampleAccountClient_Get_batchAccountGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateBatchAccountGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateBatchAccountGet.json func ExampleAccountClient_Get_privateBatchAccountGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -491,7 +491,7 @@ func ExampleAccountClient_Get_privateBatchAccountGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountList.json func ExampleAccountClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -542,7 +542,7 @@ func ExampleAccountClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountListByResourceGroup.json func ExampleAccountClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -593,7 +593,7 @@ func ExampleAccountClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountSynchronizeAutoStorageKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountSynchronizeAutoStorageKeys.json func ExampleAccountClient_SynchronizeAutoStorageKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -610,7 +610,7 @@ func ExampleAccountClient_SynchronizeAutoStorageKeys() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountRegenerateKey.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountRegenerateKey.json func ExampleAccountClient_RegenerateKey() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -637,7 +637,7 @@ func ExampleAccountClient_RegenerateKey() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountGetKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountGetKeys.json func ExampleAccountClient_GetKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -662,7 +662,7 @@ func ExampleAccountClient_GetKeys() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/DetectorList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/DetectorList.json func ExampleAccountClient_NewListDetectorsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -698,7 +698,7 @@ func ExampleAccountClient_NewListDetectorsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/DetectorGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/DetectorGet.json func ExampleAccountClient_GetDetector() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -726,7 +726,7 @@ func ExampleAccountClient_GetDetector() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json func ExampleAccountClient_NewListOutboundNetworkDependenciesEndpointsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/application_client.go b/sdk/resourcemanager/batch/armbatch/application_client.go index 13cbcdff9e3b..bdf0dc698f40 100644 --- a/sdk/resourcemanager/batch/armbatch/application_client.go +++ b/sdk/resourcemanager/batch/armbatch/application_client.go @@ -47,7 +47,7 @@ func NewApplicationClient(subscriptionID string, credential azcore.TokenCredenti // Create - Adds an application to the specified Batch account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -98,7 +98,7 @@ func (client *ApplicationClient) createCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -122,7 +122,7 @@ func (client *ApplicationClient) createHandleResponse(resp *http.Response) (Appl // Delete - Deletes an application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -172,7 +172,7 @@ func (client *ApplicationClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,7 +181,7 @@ func (client *ApplicationClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets information about the specified application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -232,7 +232,7 @@ func (client *ApplicationClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +249,7 @@ func (client *ApplicationClient) getHandleResponse(resp *http.Response) (Applica // NewListPager - Lists all of the applications in the specified account. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - ApplicationClientListOptions contains the optional parameters for the ApplicationClient.NewListPager method. @@ -299,7 +299,7 @@ func (client *ApplicationClient) listCreateRequest(ctx context.Context, resource if options != nil && options.Maxresults != nil { reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10)) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +317,7 @@ func (client *ApplicationClient) listHandleResponse(resp *http.Response) (Applic // Update - Updates settings for the specified application. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -369,7 +369,7 @@ func (client *ApplicationClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/application_client_example_test.go b/sdk/resourcemanager/batch/armbatch/application_client_example_test.go index 8e1aa8ac03e4..289dae46fd12 100644 --- a/sdk/resourcemanager/batch/armbatch/application_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/application_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationCreate.json func ExampleApplicationClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -54,7 +54,7 @@ func ExampleApplicationClient_Create() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationDelete.json func ExampleApplicationClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -71,7 +71,7 @@ func ExampleApplicationClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationGet.json func ExampleApplicationClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -101,7 +101,7 @@ func ExampleApplicationClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationUpdate.json func ExampleApplicationClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -138,7 +138,7 @@ func ExampleApplicationClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationList.json func ExampleApplicationClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/applicationpackage_client.go b/sdk/resourcemanager/batch/armbatch/applicationpackage_client.go index 2df7e42c598e..08fe1ee93f78 100644 --- a/sdk/resourcemanager/batch/armbatch/applicationpackage_client.go +++ b/sdk/resourcemanager/batch/armbatch/applicationpackage_client.go @@ -49,7 +49,7 @@ func NewApplicationPackageClient(subscriptionID string, credential azcore.TokenC // Tasks. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -107,7 +107,7 @@ func (client *ApplicationPackageClient) activateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -131,7 +131,7 @@ func (client *ApplicationPackageClient) activateHandleResponse(resp *http.Respon // returned will contain a SAS. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -188,7 +188,7 @@ func (client *ApplicationPackageClient) createCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -212,7 +212,7 @@ func (client *ApplicationPackageClient) createHandleResponse(resp *http.Response // Delete - Deletes an application package record and its associated binary file. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -268,7 +268,7 @@ func (client *ApplicationPackageClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -277,7 +277,7 @@ func (client *ApplicationPackageClient) deleteCreateRequest(ctx context.Context, // Get - Gets information about the specified application package. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -333,7 +333,7 @@ func (client *ApplicationPackageClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -350,7 +350,7 @@ func (client *ApplicationPackageClient) getHandleResponse(resp *http.Response) ( // NewListPager - Lists all of the application packages in the specified application. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - applicationName - The name of the application. This must be unique within the account. @@ -406,7 +406,7 @@ func (client *ApplicationPackageClient) listCreateRequest(ctx context.Context, r if options != nil && options.Maxresults != nil { reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10)) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/batch/armbatch/applicationpackage_client_example_test.go b/sdk/resourcemanager/batch/armbatch/applicationpackage_client_example_test.go index 77d3e7a2f13c..2dbb65f0411b 100644 --- a/sdk/resourcemanager/batch/armbatch/applicationpackage_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/applicationpackage_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageActivate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageActivate.json func ExampleApplicationPackageClient_Activate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -51,7 +51,7 @@ func ExampleApplicationPackageClient_Activate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageCreate.json func ExampleApplicationPackageClient_Create() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,7 +82,7 @@ func ExampleApplicationPackageClient_Create() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageDelete.json func ExampleApplicationPackageClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -99,7 +99,7 @@ func ExampleApplicationPackageClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageGet.json func ExampleApplicationPackageClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -130,7 +130,7 @@ func ExampleApplicationPackageClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageList.json func ExampleApplicationPackageClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/autorest.md b/sdk/resourcemanager/batch/armbatch/autorest.md index 677758de29cf..b5d1120bfd6e 100644 --- a/sdk/resourcemanager/batch/armbatch/autorest.md +++ b/sdk/resourcemanager/batch/armbatch/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.1.0 -tag: package-2023-05 +module-version: 2.2.0 +tag: package-2023-11 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/batch/armbatch/certificate_client.go b/sdk/resourcemanager/batch/armbatch/certificate_client.go index 37bf213b2e76..ba7904ac6117 100644 --- a/sdk/resourcemanager/batch/armbatch/certificate_client.go +++ b/sdk/resourcemanager/batch/armbatch/certificate_client.go @@ -54,7 +54,7 @@ func NewCertificateClient(subscriptionID string, credential azcore.TokenCredenti // instead. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -107,7 +107,7 @@ func (client *CertificateClient) cancelDeletionCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -130,7 +130,7 @@ func (client *CertificateClient) cancelDeletionHandleResponse(resp *http.Respons // instead. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -183,7 +183,7 @@ func (client *CertificateClient) createCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} @@ -215,7 +215,7 @@ func (client *CertificateClient) createHandleResponse(resp *http.Response) (Cert // instead. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -244,7 +244,7 @@ func (client *CertificateClient) BeginDelete(ctx context.Context, resourceGroupN // instead. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 func (client *CertificateClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, certificateName string, options *CertificateClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "CertificateClient.BeginDelete" @@ -290,7 +290,7 @@ func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -301,7 +301,7 @@ func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resour // instead. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -353,7 +353,7 @@ func (client *CertificateClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -375,7 +375,7 @@ func (client *CertificateClient) getHandleResponse(resp *http.Response) (Certifi // the Azure KeyVault Extension [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide] // instead. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - CertificateClientListByBatchAccountOptions contains the optional parameters for the CertificateClient.NewListByBatchAccountPager @@ -432,7 +432,7 @@ func (client *CertificateClient) listByBatchAccountCreateRequest(ctx context.Con if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -452,7 +452,7 @@ func (client *CertificateClient) listByBatchAccountHandleResponse(resp *http.Res // instead. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, @@ -505,7 +505,7 @@ func (client *CertificateClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} diff --git a/sdk/resourcemanager/batch/armbatch/certificate_client_example_test.go b/sdk/resourcemanager/batch/armbatch/certificate_client_example_test.go index 478751dce040..542a55c86b68 100644 --- a/sdk/resourcemanager/batch/armbatch/certificate_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/certificate_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateList.json func ExampleCertificateClient_NewListByBatchAccountPager_listCertificates() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -63,7 +63,7 @@ func ExampleCertificateClient_NewListByBatchAccountPager_listCertificates() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateListWithFilter.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateListWithFilter.json func ExampleCertificateClient_NewListByBatchAccountPager_listCertificatesFilterAndSelect() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -114,7 +114,7 @@ func ExampleCertificateClient_NewListByBatchAccountPager_listCertificatesFilterA } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_Full.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateCreate_Full.json func ExampleCertificateClient_Create_createCertificateFull() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -158,7 +158,7 @@ func ExampleCertificateClient_Create_createCertificateFull() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_MinimalCer.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateCreate_MinimalCer.json func ExampleCertificateClient_Create_createCertificateMinimalCer() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -199,7 +199,7 @@ func ExampleCertificateClient_Create_createCertificateMinimalCer() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_Minimal.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateCreate_Minimal.json func ExampleCertificateClient_Create_createCertificateMinimalPfx() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -240,7 +240,7 @@ func ExampleCertificateClient_Create_createCertificateMinimalPfx() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateUpdate.json func ExampleCertificateClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -279,7 +279,7 @@ func ExampleCertificateClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateDelete.json func ExampleCertificateClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -300,7 +300,7 @@ func ExampleCertificateClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateGet.json func ExampleCertificateClient_Get_getCertificate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -334,7 +334,7 @@ func ExampleCertificateClient_Get_getCertificate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateGetWithDeletionError.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateGetWithDeletionError.json func ExampleCertificateClient_Get_getCertificateWithDeletionError() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -380,7 +380,7 @@ func ExampleCertificateClient_Get_getCertificateWithDeletionError() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCancelDeletion.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateCancelDeletion.json func ExampleCertificateClient_CancelDeletion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/constants.go b/sdk/resourcemanager/batch/armbatch/constants.go index 5ee56181a7b4..d3760245fd2f 100644 --- a/sdk/resourcemanager/batch/armbatch/constants.go +++ b/sdk/resourcemanager/batch/armbatch/constants.go @@ -10,7 +10,7 @@ package armbatch const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch" - moduleVersion = "v2.1.0" + moduleVersion = "v2.2.0" ) // AccountKeyType - The type of account key to regenerate. @@ -59,7 +59,7 @@ func PossibleAllocationStateValues() []AllocationState { type AuthenticationMode string const ( - // AuthenticationModeAAD - The authentication mode using Azure Active Directory. + // AuthenticationModeAAD - The authentication mode using Microsoft Entra ID. AuthenticationModeAAD AuthenticationMode = "AAD" // AuthenticationModeSharedKey - The authentication mode using shared keys. AuthenticationModeSharedKey AuthenticationMode = "SharedKey" @@ -773,14 +773,16 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { } } -// StorageAccountType - The storage account type for use in creating data disks. +// StorageAccountType - The storage account type for use in creating data disks or OS disk. type StorageAccountType string const ( - // StorageAccountTypePremiumLRS - The data disk should use premium locally redundant storage. + // StorageAccountTypePremiumLRS - The data disk / OS disk should use premium locally redundant storage. StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" - // StorageAccountTypeStandardLRS - The data disk should use standard locally redundant storage. + // StorageAccountTypeStandardLRS - The data disk / OS disk should use standard locally redundant storage. StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" + // StorageAccountTypeStandardSSDLRS - The data disk / OS disk should use standard SSD locally redundant storage. + StorageAccountTypeStandardSSDLRS StorageAccountType = "StandardSSD_LRS" ) // PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type. @@ -788,5 +790,6 @@ func PossibleStorageAccountTypeValues() []StorageAccountType { return []StorageAccountType{ StorageAccountTypePremiumLRS, StorageAccountTypeStandardLRS, + StorageAccountTypeStandardSSDLRS, } } diff --git a/sdk/resourcemanager/batch/armbatch/location_client.go b/sdk/resourcemanager/batch/armbatch/location_client.go index 2df0ed081b08..8faea3c64908 100644 --- a/sdk/resourcemanager/batch/armbatch/location_client.go +++ b/sdk/resourcemanager/batch/armbatch/location_client.go @@ -47,7 +47,7 @@ func NewLocationClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Checks whether the Batch account name is available in the specified region. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - locationName - The desired region for the name check. // - parameters - Properties needed to check the availability of a name. // - options - LocationClientCheckNameAvailabilityOptions contains the optional parameters for the LocationClient.CheckNameAvailability @@ -90,7 +90,7 @@ func (client *LocationClient) checkNameAvailabilityCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -111,7 +111,7 @@ func (client *LocationClient) checkNameAvailabilityHandleResponse(resp *http.Res // GetQuotas - Gets the Batch service quotas for the specified subscription at the given location. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - locationName - The region for which to retrieve Batch service quotas. // - options - LocationClientGetQuotasOptions contains the optional parameters for the LocationClient.GetQuotas method. func (client *LocationClient) GetQuotas(ctx context.Context, locationName string, options *LocationClientGetQuotasOptions) (LocationClientGetQuotasResponse, error) { @@ -152,7 +152,7 @@ func (client *LocationClient) getQuotasCreateRequest(ctx context.Context, locati return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -170,7 +170,7 @@ func (client *LocationClient) getQuotasHandleResponse(resp *http.Response) (Loca // NewListSupportedCloudServiceSKUsPager - Gets the list of Batch supported Cloud Service VM sizes available at the given // location. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - locationName - The region for which to retrieve Batch service supported SKUs. // - options - LocationClientListSupportedCloudServiceSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedCloudServiceSKUsPager // method. @@ -219,7 +219,7 @@ func (client *LocationClient) listSupportedCloudServiceSKUsCreateRequest(ctx con if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -237,7 +237,7 @@ func (client *LocationClient) listSupportedCloudServiceSKUsHandleResponse(resp * // NewListSupportedVirtualMachineSKUsPager - Gets the list of Batch supported Virtual Machine VM sizes available at the given // location. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - locationName - The region for which to retrieve Batch service supported SKUs. // - options - LocationClientListSupportedVirtualMachineSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedVirtualMachineSKUsPager // method. @@ -286,7 +286,7 @@ func (client *LocationClient) listSupportedVirtualMachineSKUsCreateRequest(ctx c if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/batch/armbatch/location_client_example_test.go b/sdk/resourcemanager/batch/armbatch/location_client_example_test.go index fcd150bdd2b8..9875b8457b5f 100644 --- a/sdk/resourcemanager/batch/armbatch/location_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/location_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationGetQuotas.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationGetQuotas.json func ExampleLocationClient_GetQuotas() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -41,7 +41,7 @@ func ExampleLocationClient_GetQuotas() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationListVirtualMachineSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationListVirtualMachineSkus.json func ExampleLocationClient_NewListSupportedVirtualMachineSKUsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +104,7 @@ func ExampleLocationClient_NewListSupportedVirtualMachineSKUsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationListCloudServiceSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationListCloudServiceSkus.json func ExampleLocationClient_NewListSupportedCloudServiceSKUsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -167,7 +167,7 @@ func ExampleLocationClient_NewListSupportedCloudServiceSKUsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationCheckNameAvailability_AlreadyExists.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationCheckNameAvailability_AlreadyExists.json func ExampleLocationClient_CheckNameAvailability_locationCheckNameAvailabilityAlreadyExists() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -195,7 +195,7 @@ func ExampleLocationClient_CheckNameAvailability_locationCheckNameAvailabilityAl // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationCheckNameAvailability_Available.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationCheckNameAvailability_Available.json func ExampleLocationClient_CheckNameAvailability_locationCheckNameAvailabilityAvailable() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/models.go b/sdk/resourcemanager/batch/armbatch/models.go index 5d0ba5fc3c45..2cedd24deb03 100644 --- a/sdk/resourcemanager/batch/armbatch/models.go +++ b/sdk/resourcemanager/batch/armbatch/models.go @@ -70,8 +70,8 @@ type AccountCreateProperties struct { NetworkProfile *NetworkProfile // The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService, - // clients may authenticate using access keys or Azure Active Directory. If the - // mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. + // clients may authenticate using access keys or Microsoft Entra ID. If the mode + // is UserSubscription, clients must use Microsoft Entra ID. The default is BatchService. PoolAllocationMode *PoolAllocationMode // If not specified, the default value is 'enabled'. @@ -726,7 +726,7 @@ type DiffDiskSettings struct { } // DiskEncryptionConfiguration - The disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration -// is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image. +// is not supported on Linux pool created with Virtual Machine Image or Azure Compute Gallery Image. type DiskEncryptionConfiguration struct { // On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. Targets []*DiskEncryptionTarget @@ -810,7 +810,7 @@ type IPRule struct { // Machine. To get the list of all imageReferences verified by Azure Batch, see the 'List // supported node agent SKUs' operation. type ImageReference struct { - // This property is mutually exclusive with other properties. The Shared Image Gallery image must have replicas in the same + // This property is mutually exclusive with other properties. The Azure Compute Gallery Image must have replicas in the same // region as the Azure Batch account. For information about the firewall settings // for the Batch node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. ID *string @@ -957,6 +957,11 @@ type LocationQuota struct { AccountQuota *int32 } +type ManagedDisk struct { + // The storage account type for use in creating data disks or OS disk. + StorageAccountType *StorageAccountType +} + // MetadataItem - The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. type MetadataItem struct { // REQUIRED; The name of the metadata item. @@ -1068,8 +1073,18 @@ type NodePlacementConfiguration struct { // OSDisk - Settings for the operating system disk of the virtual machine. type OSDisk struct { + // The type of caching to enable for the disk. + Caching *CachingType + + // The initial disk size in GB when creating new OS disk. + DiskSizeGB *int32 + // Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. EphemeralOSDiskSettings *DiffDiskSettings + ManagedDisk *ManagedDisk + + // Specifies whether writeAccelerator should be enabled or disabled on the disk. + WriteAcceleratorEnabled *bool } // Operation - A REST API operation @@ -1216,6 +1231,11 @@ type PoolProperties struct { // The network configuration for a pool. NetworkConfiguration *NetworkConfiguration + // The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing + // Azure resources associated with the pool. This property can only be specified + // when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + ResourceTags map[string]*string + // Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified, // or 'autoScale' which defines a formula which is periodically reevaluated. // If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes. @@ -1508,6 +1528,28 @@ type ScaleSettings struct { FixedScale *FixedScaleSettings } +// SecurityProfile - Specifies the security profile settings for the virtual machine or virtual machine scale set. +type SecurityProfile struct { + // This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual + // machine scale set. This will enable the encryption for all the disks + // including Resource/Temp disk at host itself. + EncryptionAtHost *bool + + // Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. + SecurityType *string + + // Specifies the security settings like secure boot and vTPM used while creating the virtual machine. + UefiSettings *UefiSettings +} + +// ServiceArtifactReference - Specifies the service artifact reference id used to set same image version for all virtual machines +// in the scale set when using 'latest' image version. +type ServiceArtifactReference struct { + // REQUIRED; The service artifact reference id in the form of + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} + ID *string +} + // StartTask - In some cases the start task may be re-run even though the node was not rebooted. Due to this, start tasks // should be idempotent and exit gracefully if the setup they're performing has already been // done. Special care should be taken to avoid start tasks which create breakaway process or install/launch services from @@ -1532,7 +1574,7 @@ type StartTask struct { // retries. The Batch service will try the task once, and may then retry up to this // limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). // If the maximum retry count is 0, the Batch service does not retry the task. If - // the maximum retry count is -1, the Batch service retries the task without limit. + // the maximum retry count is -1, the Batch service retries the task without limit. Default is 0 MaxTaskRetryCount *int32 // A list of files that the Batch service will download to the compute node before running the command line. @@ -1595,6 +1637,15 @@ type TaskSchedulingPolicy struct { NodeFillType *ComputeNodeFillType } +// UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine. +type UefiSettings struct { + // Specifies whether secure boot should be enabled on the virtual machine. + SecureBootEnabled *bool + + // Specifies whether vTPM should be enabled on the virtual machine. + VTpmEnabled *bool +} + // UserAccount - Properties used to create a user on an Azure Batch node. type UserAccount struct { // REQUIRED; The name of the user account. Names can contain any Unicode characters up to a maximum length of 20. @@ -1707,6 +1758,13 @@ type VirtualMachineConfiguration struct { // Contains configuration for ephemeral OSDisk settings. OSDisk *OSDisk + // Specifies the security profile settings for the virtual machine or virtual machine scale set. + SecurityProfile *SecurityProfile + + // The service artifact reference id in the form of + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} + ServiceArtifactReference *ServiceArtifactReference + // This property must not be specified if the imageReference specifies a Linux OS image. WindowsConfiguration *WindowsConfiguration } diff --git a/sdk/resourcemanager/batch/armbatch/models_serde.go b/sdk/resourcemanager/batch/armbatch/models_serde.go index 9346af4ac1a0..de6f9f16df08 100644 --- a/sdk/resourcemanager/batch/armbatch/models_serde.go +++ b/sdk/resourcemanager/batch/armbatch/models_serde.go @@ -2367,6 +2367,33 @@ func (l *LocationQuota) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ManagedDisk. +func (m ManagedDisk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "storageAccountType", m.StorageAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDisk. +func (m *ManagedDisk) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storageAccountType": + err = unpopulate(val, "StorageAccountType", &m.StorageAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type MetadataItem. func (m MetadataItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2615,7 +2642,11 @@ func (n *NodePlacementConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OSDisk. func (o OSDisk) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "caching", o.Caching) + populate(objectMap, "diskSizeGB", o.DiskSizeGB) populate(objectMap, "ephemeralOSDiskSettings", o.EphemeralOSDiskSettings) + populate(objectMap, "managedDisk", o.ManagedDisk) + populate(objectMap, "writeAcceleratorEnabled", o.WriteAcceleratorEnabled) return json.Marshal(objectMap) } @@ -2628,9 +2659,21 @@ func (o *OSDisk) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "caching": + err = unpopulate(val, "Caching", &o.Caching) + delete(rawMsg, key) + case "diskSizeGB": + err = unpopulate(val, "DiskSizeGB", &o.DiskSizeGB) + delete(rawMsg, key) case "ephemeralOSDiskSettings": err = unpopulate(val, "EphemeralOSDiskSettings", &o.EphemeralOSDiskSettings) delete(rawMsg, key) + case "managedDisk": + err = unpopulate(val, "ManagedDisk", &o.ManagedDisk) + delete(rawMsg, key) + case "writeAcceleratorEnabled": + err = unpopulate(val, "WriteAcceleratorEnabled", &o.WriteAcceleratorEnabled) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", o, err) @@ -2942,6 +2985,7 @@ func (p PoolProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", p.ProvisioningState) populateDateTimeRFC3339(objectMap, "provisioningStateTransitionTime", p.ProvisioningStateTransitionTime) populate(objectMap, "resizeOperationStatus", p.ResizeOperationStatus) + populate(objectMap, "resourceTags", p.ResourceTags) populate(objectMap, "scaleSettings", p.ScaleSettings) populate(objectMap, "startTask", p.StartTask) populate(objectMap, "targetNodeCommunicationMode", p.TargetNodeCommunicationMode) @@ -3021,6 +3065,9 @@ func (p *PoolProperties) UnmarshalJSON(data []byte) error { case "resizeOperationStatus": err = unpopulate(val, "ResizeOperationStatus", &p.ResizeOperationStatus) delete(rawMsg, key) + case "resourceTags": + err = unpopulate(val, "ResourceTags", &p.ResourceTags) + delete(rawMsg, key) case "scaleSettings": err = unpopulate(val, "ScaleSettings", &p.ScaleSettings) delete(rawMsg, key) @@ -3580,6 +3627,68 @@ func (s *ScaleSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SecurityProfile. +func (s SecurityProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryptionAtHost", s.EncryptionAtHost) + objectMap["securityType"] = "trustedLaunch" + populate(objectMap, "uefiSettings", s.UefiSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityProfile. +func (s *SecurityProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encryptionAtHost": + err = unpopulate(val, "EncryptionAtHost", &s.EncryptionAtHost) + delete(rawMsg, key) + case "securityType": + err = unpopulate(val, "SecurityType", &s.SecurityType) + delete(rawMsg, key) + case "uefiSettings": + err = unpopulate(val, "UefiSettings", &s.UefiSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceArtifactReference. +func (s ServiceArtifactReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceArtifactReference. +func (s *ServiceArtifactReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type StartTask. func (s StartTask) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3763,6 +3872,37 @@ func (t *TaskSchedulingPolicy) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UefiSettings. +func (u UefiSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "secureBootEnabled", u.SecureBootEnabled) + populate(objectMap, "vTpmEnabled", u.VTpmEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UefiSettings. +func (u *UefiSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secureBootEnabled": + err = unpopulate(val, "SecureBootEnabled", &u.SecureBootEnabled) + delete(rawMsg, key) + case "vTpmEnabled": + err = unpopulate(val, "VTpmEnabled", &u.VTpmEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type UserAccount. func (u UserAccount) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3939,6 +4079,8 @@ func (v VirtualMachineConfiguration) MarshalJSON() ([]byte, error) { populate(objectMap, "nodeAgentSkuId", v.NodeAgentSKUID) populate(objectMap, "nodePlacementConfiguration", v.NodePlacementConfiguration) populate(objectMap, "osDisk", v.OSDisk) + populate(objectMap, "securityProfile", v.SecurityProfile) + populate(objectMap, "serviceArtifactReference", v.ServiceArtifactReference) populate(objectMap, "windowsConfiguration", v.WindowsConfiguration) return json.Marshal(objectMap) } @@ -3979,6 +4121,12 @@ func (v *VirtualMachineConfiguration) UnmarshalJSON(data []byte) error { case "osDisk": err = unpopulate(val, "OSDisk", &v.OSDisk) delete(rawMsg, key) + case "securityProfile": + err = unpopulate(val, "SecurityProfile", &v.SecurityProfile) + delete(rawMsg, key) + case "serviceArtifactReference": + err = unpopulate(val, "ServiceArtifactReference", &v.ServiceArtifactReference) + delete(rawMsg, key) case "windowsConfiguration": err = unpopulate(val, "WindowsConfiguration", &v.WindowsConfiguration) delete(rawMsg, key) diff --git a/sdk/resourcemanager/batch/armbatch/operations_client.go b/sdk/resourcemanager/batch/armbatch/operations_client.go index d3770c0a8e99..4b6c37968b42 100644 --- a/sdk/resourcemanager/batch/armbatch/operations_client.go +++ b/sdk/resourcemanager/batch/armbatch/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists available operations for the Microsoft.Batch provider // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -72,7 +72,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/batch/armbatch/operations_client_example_test.go b/sdk/resourcemanager/batch/armbatch/operations_client_example_test.go index b73e42ecf0d9..27b0f0ec3333 100644 --- a/sdk/resourcemanager/batch/armbatch/operations_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/OperationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/OperationsList.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/pool_client.go b/sdk/resourcemanager/batch/armbatch/pool_client.go index b967f2afc513..efbeac69c0db 100644 --- a/sdk/resourcemanager/batch/armbatch/pool_client.go +++ b/sdk/resourcemanager/batch/armbatch/pool_client.go @@ -47,7 +47,7 @@ func NewPoolClient(subscriptionID string, credential azcore.TokenCredential, opt // Create - Creates a new pool inside the specified account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - poolName - The pool name. This must be unique within the account. @@ -99,7 +99,7 @@ func (client *PoolClient) createCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} @@ -129,7 +129,7 @@ func (client *PoolClient) createHandleResponse(resp *http.Response) (PoolClientC // BeginDelete - Deletes the specified pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - poolName - The pool name. This must be unique within the account. @@ -155,7 +155,7 @@ func (client *PoolClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Deletes the specified pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 func (client *PoolClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "PoolClient.BeginDelete" @@ -201,7 +201,7 @@ func (client *PoolClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -210,7 +210,7 @@ func (client *PoolClient) deleteCreateRequest(ctx context.Context, resourceGroup // DisableAutoScale - Disables automatic scaling for a pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - poolName - The pool name. This must be unique within the account. @@ -261,7 +261,7 @@ func (client *PoolClient) disableAutoScaleCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *PoolClient) disableAutoScaleHandleResponse(resp *http.Response) (P // Get - Gets information about the specified pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - poolName - The pool name. This must be unique within the account. @@ -333,7 +333,7 @@ func (client *PoolClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -353,7 +353,7 @@ func (client *PoolClient) getHandleResponse(resp *http.Response) (PoolClientGetR // NewListByBatchAccountPager - Lists all of the pools in the specified account. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - PoolClientListByBatchAccountOptions contains the optional parameters for the PoolClient.NewListByBatchAccountPager @@ -410,7 +410,7 @@ func (client *PoolClient) listByBatchAccountCreateRequest(ctx context.Context, r if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -432,7 +432,7 @@ func (client *PoolClient) listByBatchAccountHandleResponse(resp *http.Response) // not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - poolName - The pool name. This must be unique within the account. @@ -483,7 +483,7 @@ func (client *PoolClient) stopResizeCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -504,7 +504,7 @@ func (client *PoolClient) stopResizeHandleResponse(resp *http.Response) (PoolCli // Update - Updates the properties of an existing pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - poolName - The pool name. This must be unique within the account. @@ -557,7 +557,7 @@ func (client *PoolClient) updateCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} diff --git a/sdk/resourcemanager/batch/armbatch/pool_client_example_test.go b/sdk/resourcemanager/batch/armbatch/pool_client_example_test.go index da945eebf42c..0c956ddf67cc 100644 --- a/sdk/resourcemanager/batch/armbatch/pool_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/pool_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolList.json func ExamplePoolClient_NewListByBatchAccountPager_listPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -180,7 +180,7 @@ func ExamplePoolClient_NewListByBatchAccountPager_listPool() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolListWithFilter.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolListWithFilter.json func ExamplePoolClient_NewListByBatchAccountPager_listPoolWithFilter() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -235,7 +235,7 @@ func ExamplePoolClient_NewListByBatchAccountPager_listPoolWithFilter() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_SharedImageGallery.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_SharedImageGallery.json func ExamplePoolClient_Create_createPoolCustomImage() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -305,7 +305,7 @@ func ExamplePoolClient_Create_createPoolCustomImage() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_CloudServiceConfiguration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_CloudServiceConfiguration.json func ExamplePoolClient_Create_createPoolFullCloudServiceConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -519,7 +519,7 @@ func ExamplePoolClient_Create_createPoolFullCloudServiceConfiguration() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_VirtualMachineConfiguration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration.json func ExamplePoolClient_Create_createPoolFullVirtualMachineConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -712,7 +712,7 @@ func ExamplePoolClient_Create_createPoolFullVirtualMachineConfiguration() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json func ExamplePoolClient_Create_createPoolMinimalCloudServiceConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -789,7 +789,7 @@ func ExamplePoolClient_Create_createPoolMinimalCloudServiceConfiguration() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json func ExamplePoolClient_Create_createPoolMinimalVirtualMachineConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -871,7 +871,7 @@ func ExamplePoolClient_Create_createPoolMinimalVirtualMachineConfiguration() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_NoPublicIPAddresses.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_NoPublicIPAddresses.json func ExamplePoolClient_Create_createPoolNoPublicIp() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -953,7 +953,7 @@ func ExamplePoolClient_Create_createPoolNoPublicIp() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_PublicIPs.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_PublicIPs.json func ExamplePoolClient_Create_createPoolPublicIPs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1039,7 +1039,207 @@ func ExamplePoolClient_Create_createPoolPublicIPs() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_UserAssignedIdentities.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_ResourceTags.json +func ExamplePoolClient_Create_createPoolResourceTags() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armbatch.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{ + Properties: &armbatch.PoolProperties{ + DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + ImageReference: &armbatch.ImageReference{ + Offer: to.Ptr("UbuntuServer"), + Publisher: to.Ptr("Canonical"), + SKU: to.Ptr("18_04-lts-gen2"), + Version: to.Ptr("latest"), + }, + NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"), + }, + }, + ResourceTags: map[string]*string{ + "TagName1": to.Ptr("TagValue1"), + "TagName2": to.Ptr("TagValue2"), + }, + ScaleSettings: &armbatch.ScaleSettings{ + FixedScale: &armbatch.FixedScaleSettings{ + TargetDedicatedNodes: to.Ptr[int32](1), + TargetLowPriorityNodes: to.Ptr[int32](0), + }, + }, + VMSize: to.Ptr("Standard_d4s_v3"), + }, + }, &armbatch.PoolClientCreateOptions{IfMatch: nil, + IfNoneMatch: 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.Pool = armbatch.Pool{ + // Name: to.Ptr("testpool"), + // Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"), + // Etag: to.Ptr("W/\"0x8DB554F8E08BCF4\""), + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"), + // Properties: &armbatch.PoolProperties{ + // AllocationState: to.Ptr(armbatch.AllocationStateResizing), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // CurrentDedicatedNodes: to.Ptr[int32](0), + // CurrentLowPriorityNodes: to.Ptr[int32](0), + // DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + // VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + // ImageReference: &armbatch.ImageReference{ + // Offer: to.Ptr("UbuntuServer"), + // Publisher: to.Ptr("Canonical"), + // SKU: to.Ptr("18_04-lts-gen2"), + // Version: to.Ptr("latest"), + // }, + // NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"), + // }, + // }, + // InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled), + // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded), + // ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // ResizeOperationStatus: &armbatch.ResizeOperationStatus{ + // NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue), + // ResizeTimeout: to.Ptr("PT15M"), + // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-27T07:33:13.062Z"); return t}()), + // TargetDedicatedNodes: to.Ptr[int32](1), + // }, + // ResourceTags: map[string]*string{ + // "TagName1": to.Ptr("TagValue1"), + // "TagName2": to.Ptr("TagValue2"), + // }, + // ScaleSettings: &armbatch.ScaleSettings{ + // FixedScale: &armbatch.FixedScaleSettings{ + // ResizeTimeout: to.Ptr("PT15M"), + // TargetDedicatedNodes: to.Ptr[int32](1), + // TargetLowPriorityNodes: to.Ptr[int32](0), + // }, + // }, + // TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{ + // NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread), + // }, + // TaskSlotsPerNode: to.Ptr[int32](1), + // VMSize: to.Ptr("STANDARD_D4S_V3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_SecurityProfile.json +func ExamplePoolClient_Create_createPoolSecurityProfile() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armbatch.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{ + Properties: &armbatch.PoolProperties{ + DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + ImageReference: &armbatch.ImageReference{ + Offer: to.Ptr("UbuntuServer"), + Publisher: to.Ptr("Canonical"), + SKU: to.Ptr("18_04-lts-gen2"), + Version: to.Ptr("latest"), + }, + NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"), + SecurityProfile: &armbatch.SecurityProfile{ + EncryptionAtHost: to.Ptr(true), + SecurityType: to.Ptr("trustedLaunch"), + UefiSettings: &armbatch.UefiSettings{ + VTpmEnabled: to.Ptr(false), + }, + }, + }, + }, + ScaleSettings: &armbatch.ScaleSettings{ + FixedScale: &armbatch.FixedScaleSettings{ + TargetDedicatedNodes: to.Ptr[int32](1), + TargetLowPriorityNodes: to.Ptr[int32](0), + }, + }, + VMSize: to.Ptr("Standard_d4s_v3"), + }, + }, &armbatch.PoolClientCreateOptions{IfMatch: nil, + IfNoneMatch: 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.Pool = armbatch.Pool{ + // Name: to.Ptr("testpool"), + // Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"), + // Etag: to.Ptr("W/\"0x8DB554F8E08BCF4\""), + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"), + // Properties: &armbatch.PoolProperties{ + // AllocationState: to.Ptr(armbatch.AllocationStateResizing), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // CurrentDedicatedNodes: to.Ptr[int32](0), + // CurrentLowPriorityNodes: to.Ptr[int32](0), + // DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + // VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + // ImageReference: &armbatch.ImageReference{ + // Offer: to.Ptr("UbuntuServer"), + // Publisher: to.Ptr("Canonical"), + // SKU: to.Ptr("18_04-lts-gen2"), + // Version: to.Ptr("latest"), + // }, + // NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"), + // SecurityProfile: &armbatch.SecurityProfile{ + // EncryptionAtHost: to.Ptr(true), + // SecurityType: to.Ptr("trustedLaunch"), + // UefiSettings: &armbatch.UefiSettings{ + // VTpmEnabled: to.Ptr(false), + // }, + // }, + // }, + // }, + // InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled), + // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded), + // ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // ResizeOperationStatus: &armbatch.ResizeOperationStatus{ + // NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue), + // ResizeTimeout: to.Ptr("PT15M"), + // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // TargetDedicatedNodes: to.Ptr[int32](1), + // }, + // ScaleSettings: &armbatch.ScaleSettings{ + // FixedScale: &armbatch.FixedScaleSettings{ + // ResizeTimeout: to.Ptr("PT15M"), + // TargetDedicatedNodes: to.Ptr[int32](1), + // TargetLowPriorityNodes: to.Ptr[int32](0), + // }, + // }, + // TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{ + // NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread), + // }, + // TaskSlotsPerNode: to.Ptr[int32](1), + // VMSize: to.Ptr("STANDARD_D4S_V3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_UserAssignedIdentities.json func ExamplePoolClient_Create_createPoolUserAssignedIdentities() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1141,7 +1341,7 @@ func ExamplePoolClient_Create_createPoolUserAssignedIdentities() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationExtensions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1249,7 +1449,212 @@ func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationExtensions() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_AcceleratedNetworking.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json +func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationOsDisk() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armbatch.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{ + Properties: &armbatch.PoolProperties{ + DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + ImageReference: &armbatch.ImageReference{ + Offer: to.Ptr("windowsserver"), + Publisher: to.Ptr("microsoftwindowsserver"), + SKU: to.Ptr("2022-datacenter-smalldisk"), + }, + NodeAgentSKUID: to.Ptr("batch.node.windows amd64"), + OSDisk: &armbatch.OSDisk{ + Caching: to.Ptr(armbatch.CachingTypeReadWrite), + DiskSizeGB: to.Ptr[int32](100), + ManagedDisk: &armbatch.ManagedDisk{ + StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS), + }, + WriteAcceleratorEnabled: to.Ptr(false), + }, + }, + }, + ScaleSettings: &armbatch.ScaleSettings{ + FixedScale: &armbatch.FixedScaleSettings{ + TargetDedicatedNodes: to.Ptr[int32](1), + TargetLowPriorityNodes: to.Ptr[int32](0), + }, + }, + VMSize: to.Ptr("Standard_d2s_v3"), + }, + }, &armbatch.PoolClientCreateOptions{IfMatch: nil, + IfNoneMatch: 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.Pool = armbatch.Pool{ + // Name: to.Ptr("testpool"), + // Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"), + // Etag: to.Ptr("W/\"0x8DB51F396992B8D\""), + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"), + // Properties: &armbatch.PoolProperties{ + // AllocationState: to.Ptr(armbatch.AllocationStateResizing), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // CurrentDedicatedNodes: to.Ptr[int32](0), + // CurrentLowPriorityNodes: to.Ptr[int32](0), + // DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + // VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + // ImageReference: &armbatch.ImageReference{ + // Offer: to.Ptr("windowsserver"), + // Publisher: to.Ptr("microsoftwindowsserver"), + // SKU: to.Ptr("2022-datacenter-smalldisk"), + // Version: to.Ptr("latest"), + // }, + // NodeAgentSKUID: to.Ptr("batch.node.windows amd64"), + // OSDisk: &armbatch.OSDisk{ + // Caching: to.Ptr(armbatch.CachingTypeReadWrite), + // DiskSizeGB: to.Ptr[int32](100), + // ManagedDisk: &armbatch.ManagedDisk{ + // StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS), + // }, + // WriteAcceleratorEnabled: to.Ptr(false), + // }, + // }, + // }, + // InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled), + // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded), + // ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // ResizeOperationStatus: &armbatch.ResizeOperationStatus{ + // NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue), + // ResizeTimeout: to.Ptr("PT15M"), + // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // TargetDedicatedNodes: to.Ptr[int32](1), + // }, + // ScaleSettings: &armbatch.ScaleSettings{ + // FixedScale: &armbatch.FixedScaleSettings{ + // ResizeTimeout: to.Ptr("PT15M"), + // TargetDedicatedNodes: to.Ptr[int32](1), + // TargetLowPriorityNodes: to.Ptr[int32](0), + // }, + // }, + // TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{ + // NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread), + // }, + // TaskSlotsPerNode: to.Ptr[int32](1), + // VMSize: to.Ptr("STANDARD_D2_V3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json +func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationServiceArtifactReference() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armbatch.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{ + Properties: &armbatch.PoolProperties{ + DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + ImageReference: &armbatch.ImageReference{ + Offer: to.Ptr("WindowsServer"), + Publisher: to.Ptr("MicrosoftWindowsServer"), + SKU: to.Ptr("2019-datacenter-smalldisk"), + Version: to.Ptr("latest"), + }, + NodeAgentSKUID: to.Ptr("batch.node.windows amd64"), + ServiceArtifactReference: &armbatch.ServiceArtifactReference{ + ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"), + }, + WindowsConfiguration: &armbatch.WindowsConfiguration{ + EnableAutomaticUpdates: to.Ptr(false), + }, + }, + }, + ScaleSettings: &armbatch.ScaleSettings{ + FixedScale: &armbatch.FixedScaleSettings{ + TargetDedicatedNodes: to.Ptr[int32](2), + TargetLowPriorityNodes: to.Ptr[int32](0), + }, + }, + VMSize: to.Ptr("Standard_d4s_v3"), + }, + }, &armbatch.PoolClientCreateOptions{IfMatch: nil, + IfNoneMatch: 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.Pool = armbatch.Pool{ + // Name: to.Ptr("mypool41"), + // Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"), + // Etag: to.Ptr("W/\"0x8DB51F396992B8D\""), + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"), + // Properties: &armbatch.PoolProperties{ + // AllocationState: to.Ptr(armbatch.AllocationStateResizing), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // CurrentDedicatedNodes: to.Ptr[int32](0), + // CurrentLowPriorityNodes: to.Ptr[int32](0), + // DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + // VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + // ImageReference: &armbatch.ImageReference{ + // Offer: to.Ptr("WindowsServer"), + // Publisher: to.Ptr("MicrosoftWindowsServer"), + // SKU: to.Ptr("2019-datacenter-smalldisk"), + // Version: to.Ptr("latest"), + // }, + // NodeAgentSKUID: to.Ptr("batch.node.windows amd64"), + // ServiceArtifactReference: &armbatch.ServiceArtifactReference{ + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"), + // }, + // WindowsConfiguration: &armbatch.WindowsConfiguration{ + // EnableAutomaticUpdates: to.Ptr(false), + // }, + // }, + // }, + // InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled), + // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded), + // ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // ResizeOperationStatus: &armbatch.ResizeOperationStatus{ + // NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue), + // ResizeTimeout: to.Ptr("PT15M"), + // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // TargetDedicatedNodes: to.Ptr[int32](2), + // }, + // ScaleSettings: &armbatch.ScaleSettings{ + // FixedScale: &armbatch.FixedScaleSettings{ + // ResizeTimeout: to.Ptr("PT15M"), + // TargetDedicatedNodes: to.Ptr[int32](2), + // TargetLowPriorityNodes: to.Ptr[int32](0), + // }, + // }, + // TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{ + // NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread), + // }, + // TaskSlotsPerNode: to.Ptr[int32](1), + // VMSize: to.Ptr("STANDARD_D4S_V3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_AcceleratedNetworking.json func ExamplePoolClient_Create_createPoolAcceleratedNetworking() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1348,7 +1753,7 @@ func ExamplePoolClient_Create_createPoolAcceleratedNetworking() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_EnableAutoScale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolUpdate_EnableAutoScale.json func ExamplePoolClient_Update_updatePoolEnableAutoscale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1420,7 +1825,7 @@ func ExamplePoolClient_Update_updatePoolEnableAutoscale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_OtherProperties.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolUpdate_OtherProperties.json func ExamplePoolClient_Update_updatePoolOtherProperties() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1533,7 +1938,7 @@ func ExamplePoolClient_Update_updatePoolOtherProperties() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_RemoveStartTask.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolUpdate_RemoveStartTask.json func ExamplePoolClient_Update_updatePoolRemoveStartTask() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1601,7 +2006,7 @@ func ExamplePoolClient_Update_updatePoolRemoveStartTask() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_ResizePool.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolUpdate_ResizePool.json func ExamplePoolClient_Update_updatePoolResizePool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1678,7 +2083,7 @@ func ExamplePoolClient_Update_updatePoolResizePool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolDelete.json func ExamplePoolClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1699,7 +2104,7 @@ func ExamplePoolClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet.json func ExamplePoolClient_Get_getPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1846,7 +2251,7 @@ func ExamplePoolClient_Get_getPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet_AcceleratedNetworking.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_AcceleratedNetworking.json func ExamplePoolClient_Get_getPoolAcceleratedNetworking() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1917,7 +2322,81 @@ func ExamplePoolClient_Get_getPoolAcceleratedNetworking() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_SecurityProfile.json +func ExamplePoolClient_Get_getPoolSecurityProfile() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armbatch.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewPoolClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", 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.Pool = armbatch.Pool{ + // Name: to.Ptr("testpool"), + // Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"), + // Etag: to.Ptr("W/\"0x8DB554F8E08BCF4\""), + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"), + // Properties: &armbatch.PoolProperties{ + // AllocationState: to.Ptr(armbatch.AllocationStateSteady), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:04:57.341Z"); return t}()), + // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // CurrentDedicatedNodes: to.Ptr[int32](1), + // CurrentLowPriorityNodes: to.Ptr[int32](0), + // CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic), + // DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + // VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + // ImageReference: &armbatch.ImageReference{ + // Offer: to.Ptr("UbuntuServer"), + // Publisher: to.Ptr("Canonical"), + // SKU: to.Ptr("18_04-lts-gen2"), + // Version: to.Ptr("latest"), + // }, + // NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"), + // SecurityProfile: &armbatch.SecurityProfile{ + // EncryptionAtHost: to.Ptr(true), + // SecurityType: to.Ptr("trustedLaunch"), + // UefiSettings: &armbatch.UefiSettings{ + // VTpmEnabled: to.Ptr(false), + // }, + // }, + // }, + // }, + // InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled), + // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded), + // ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // ResizeOperationStatus: &armbatch.ResizeOperationStatus{ + // NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue), + // ResizeTimeout: to.Ptr("PT15M"), + // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()), + // TargetDedicatedNodes: to.Ptr[int32](1), + // }, + // ScaleSettings: &armbatch.ScaleSettings{ + // FixedScale: &armbatch.FixedScaleSettings{ + // ResizeTimeout: to.Ptr("PT15M"), + // TargetDedicatedNodes: to.Ptr[int32](1), + // TargetLowPriorityNodes: to.Ptr[int32](0), + // }, + // }, + // TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{ + // NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread), + // }, + // TaskSlotsPerNode: to.Ptr[int32](1), + // VMSize: to.Ptr("STANDARD_D4S_V3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationExtensions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1998,7 +2477,155 @@ func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationExtensions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolDisableAutoScale.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_VirtualMachineConfiguration_MangedOSDisk.json +func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationOsDisk() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armbatch.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewPoolClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", 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.Pool = armbatch.Pool{ + // Name: to.Ptr("testpool"), + // Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"), + // Etag: to.Ptr("W/\"0x8DB51E64D3C3B69\""), + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"), + // Properties: &armbatch.PoolProperties{ + // AllocationState: to.Ptr(armbatch.AllocationStateSteady), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:13:22.488Z"); return t}()), + // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // CurrentDedicatedNodes: to.Ptr[int32](1), + // CurrentLowPriorityNodes: to.Ptr[int32](0), + // CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic), + // DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + // VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + // ImageReference: &armbatch.ImageReference{ + // Offer: to.Ptr("windowsserver"), + // Publisher: to.Ptr("microsoftwindowsserver"), + // SKU: to.Ptr("2022-datacenter-smalldisk"), + // Version: to.Ptr("latest"), + // }, + // NodeAgentSKUID: to.Ptr("batch.node.windows amd64"), + // OSDisk: &armbatch.OSDisk{ + // Caching: to.Ptr(armbatch.CachingTypeReadWrite), + // DiskSizeGB: to.Ptr[int32](100), + // ManagedDisk: &armbatch.ManagedDisk{ + // StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS), + // }, + // WriteAcceleratorEnabled: to.Ptr(false), + // }, + // }, + // }, + // InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled), + // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded), + // ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // ResizeOperationStatus: &armbatch.ResizeOperationStatus{ + // NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue), + // ResizeTimeout: to.Ptr("PT15M"), + // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()), + // TargetDedicatedNodes: to.Ptr[int32](1), + // }, + // ScaleSettings: &armbatch.ScaleSettings{ + // FixedScale: &armbatch.FixedScaleSettings{ + // ResizeTimeout: to.Ptr("PT15M"), + // TargetDedicatedNodes: to.Ptr[int32](1), + // TargetLowPriorityNodes: to.Ptr[int32](0), + // }, + // }, + // TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{ + // NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread), + // }, + // TaskSlotsPerNode: to.Ptr[int32](1), + // VMSize: to.Ptr("STANDARD_D2_V3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json +func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationServiceArtifactReference() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armbatch.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewPoolClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", 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.Pool = armbatch.Pool{ + // Name: to.Ptr("testpool"), + // Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"), + // Etag: to.Ptr("W/\"0x8DB51E64D3C3B69\""), + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"), + // Properties: &armbatch.PoolProperties{ + // AllocationState: to.Ptr(armbatch.AllocationStateSteady), + // AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:45:42.088Z"); return t}()), + // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // CurrentDedicatedNodes: to.Ptr[int32](2), + // CurrentLowPriorityNodes: to.Ptr[int32](0), + // CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic), + // DeploymentConfiguration: &armbatch.DeploymentConfiguration{ + // VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{ + // ImageReference: &armbatch.ImageReference{ + // Offer: to.Ptr("WindowsServer"), + // Publisher: to.Ptr("MicrosoftWindowsServer"), + // SKU: to.Ptr("2019-datacenter-smalldisk"), + // Version: to.Ptr("latest"), + // }, + // NodeAgentSKUID: to.Ptr("batch.node.windows amd64"), + // ServiceArtifactReference: &armbatch.ServiceArtifactReference{ + // ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"), + // }, + // WindowsConfiguration: &armbatch.WindowsConfiguration{ + // EnableAutomaticUpdates: to.Ptr(false), + // }, + // }, + // }, + // InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled), + // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded), + // ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // ResizeOperationStatus: &armbatch.ResizeOperationStatus{ + // NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue), + // ResizeTimeout: to.Ptr("PT15M"), + // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()), + // TargetDedicatedNodes: to.Ptr[int32](2), + // }, + // ScaleSettings: &armbatch.ScaleSettings{ + // FixedScale: &armbatch.FixedScaleSettings{ + // ResizeTimeout: to.Ptr("PT15M"), + // TargetDedicatedNodes: to.Ptr[int32](2), + // TargetLowPriorityNodes: to.Ptr[int32](0), + // }, + // }, + // TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{ + // NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread), + // }, + // TaskSlotsPerNode: to.Ptr[int32](1), + // VMSize: to.Ptr("STANDARD_D4S_V3"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolDisableAutoScale.json func ExamplePoolClient_DisableAutoScale() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2058,7 +2685,7 @@ func ExamplePoolClient_DisableAutoScale() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolStopResize.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolStopResize.json func ExamplePoolClient_StopResize() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/privateendpointconnection_client.go b/sdk/resourcemanager/batch/armbatch/privateendpointconnection_client.go index 81c73f99f327..6b1a42cd5302 100644 --- a/sdk/resourcemanager/batch/armbatch/privateendpointconnection_client.go +++ b/sdk/resourcemanager/batch/armbatch/privateendpointconnection_client.go @@ -47,7 +47,7 @@ func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore // BeginDelete - Deletes the specified private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account. @@ -74,7 +74,7 @@ func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, // Delete - Deletes the specified private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 func (client *PrivateEndpointConnectionClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "PrivateEndpointConnectionClient.BeginDelete" @@ -120,7 +120,7 @@ func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -129,7 +129,7 @@ func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.C // Get - Gets information about the specified private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account. @@ -181,7 +181,7 @@ func (client *PrivateEndpointConnectionClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ func (client *PrivateEndpointConnectionClient) getHandleResponse(resp *http.Resp // NewListByBatchAccountPager - Lists all of the private endpoint connections in the specified account. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - PrivateEndpointConnectionClientListByBatchAccountOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByBatchAccountPager @@ -246,7 +246,7 @@ func (client *PrivateEndpointConnectionClient) listByBatchAccountCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") if options != nil && options.Maxresults != nil { reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10)) } @@ -267,7 +267,7 @@ func (client *PrivateEndpointConnectionClient) listByBatchAccountHandleResponse( // BeginUpdate - Updates the properties of an existing private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account. @@ -296,7 +296,7 @@ func (client *PrivateEndpointConnectionClient) BeginUpdate(ctx context.Context, // Update - Updates the properties of an existing private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 func (client *PrivateEndpointConnectionClient) update(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "PrivateEndpointConnectionClient.BeginUpdate" @@ -342,7 +342,7 @@ func (client *PrivateEndpointConnectionClient) updateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} diff --git a/sdk/resourcemanager/batch/armbatch/privateendpointconnection_client_example_test.go b/sdk/resourcemanager/batch/armbatch/privateendpointconnection_client_example_test.go index 36d7a7c417ae..7c7929304bb9 100644 --- a/sdk/resourcemanager/batch/armbatch/privateendpointconnection_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/privateendpointconnection_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateEndpointConnectionsList.json func ExamplePrivateEndpointConnectionClient_NewListByBatchAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -63,7 +63,7 @@ func ExamplePrivateEndpointConnectionClient_NewListByBatchAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateEndpointConnectionGet.json func ExamplePrivateEndpointConnectionClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -100,7 +100,7 @@ func ExamplePrivateEndpointConnectionClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateEndpointConnectionUpdate.json func ExamplePrivateEndpointConnectionClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -149,7 +149,7 @@ func ExamplePrivateEndpointConnectionClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateEndpointConnectionDelete.json func ExamplePrivateEndpointConnectionClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/batch/armbatch/privatelinkresource_client.go b/sdk/resourcemanager/batch/armbatch/privatelinkresource_client.go index be34c90078cd..0a73d6635cd8 100644 --- a/sdk/resourcemanager/batch/armbatch/privatelinkresource_client.go +++ b/sdk/resourcemanager/batch/armbatch/privatelinkresource_client.go @@ -47,7 +47,7 @@ func NewPrivateLinkResourceClient(subscriptionID string, credential azcore.Token // Get - Gets information about the specified private link resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - privateLinkResourceName - The private link resource name. This must be unique within the account. @@ -98,7 +98,7 @@ func (client *PrivateLinkResourceClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +115,7 @@ func (client *PrivateLinkResourceClient) getHandleResponse(resp *http.Response) // NewListByBatchAccountPager - Lists all of the private link resources in the specified account. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-11-01 // - resourceGroupName - The name of the resource group that contains the Batch account. // - accountName - The name of the Batch account. // - options - PrivateLinkResourceClientListByBatchAccountOptions contains the optional parameters for the PrivateLinkResourceClient.NewListByBatchAccountPager @@ -163,7 +163,7 @@ func (client *PrivateLinkResourceClient) listByBatchAccountCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-11-01") if options != nil && options.Maxresults != nil { reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10)) } diff --git a/sdk/resourcemanager/batch/armbatch/privatelinkresource_client_example_test.go b/sdk/resourcemanager/batch/armbatch/privatelinkresource_client_example_test.go index b12cec365945..89fcb80583a1 100644 --- a/sdk/resourcemanager/batch/armbatch/privatelinkresource_client_example_test.go +++ b/sdk/resourcemanager/batch/armbatch/privatelinkresource_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateLinkResourcesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateLinkResourcesList.json func ExamplePrivateLinkResourceClient_NewListByBatchAccountPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -57,7 +57,7 @@ func ExamplePrivateLinkResourceClient_NewListByBatchAccountPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateLinkResourceGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateLinkResourceGet.json func ExamplePrivateLinkResourceClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {