[Release] sdk/resourcemanager/batch/armbatch/3.0.0 generation from spec commit: e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb (#23389)

Co-authored-by: ReleaseHelper <ReleaseHelper>
This commit is contained in:
Azure SDK Bot 2024-09-26 23:26:52 -07:00 коммит произвёл GitHub
Родитель 638b4a99c6
Коммит 636c563fe6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
41 изменённых файлов: 2461 добавлений и 856 удалений

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

@ -1,5 +1,66 @@
# Release History
## 3.0.0 (2024-09-27)
### Breaking Changes
- Type of `SecurityProfile.SecurityType` has been changed from `*string` to `*SecurityTypes`
- Function `*LocationClient.NewListSupportedCloudServiceSKUsPager` has been removed
- Struct `CloudServiceConfiguration` has been removed
- Field `CloudServiceConfiguration` of struct `DeploymentConfiguration` has been removed
- Field `Etag` of struct `ProxyResource` has been removed
- Field `Location`, `Tags` of struct `Resource` has been removed
### Features Added
- New value `PublicNetworkAccessTypeSecuredByPerimeter` added to enum type `PublicNetworkAccessType`
- New enum type `AccessRuleDirection` with values `AccessRuleDirectionInbound`, `AccessRuleDirectionOutbound`
- New enum type `ContainerHostDataPath` with values `ContainerHostDataPathApplications`, `ContainerHostDataPathJobPrep`, `ContainerHostDataPathShared`, `ContainerHostDataPathStartup`, `ContainerHostDataPathTask`, `ContainerHostDataPathVfsMounts`
- New enum type `CreatedByType` with values `CreatedByTypeApplication`, `CreatedByTypeKey`, `CreatedByTypeManagedIdentity`, `CreatedByTypeUser`
- New enum type `IssueType` with values `IssueTypeConfigurationPropagationFailure`, `IssueTypeMissingIdentityConfiguration`, `IssueTypeMissingPerimeterConfiguration`, `IssueTypeUnknown`
- New enum type `NetworkSecurityPerimeterConfigurationProvisioningState` with values `NetworkSecurityPerimeterConfigurationProvisioningStateAccepted`, `NetworkSecurityPerimeterConfigurationProvisioningStateCanceled`, `NetworkSecurityPerimeterConfigurationProvisioningStateCreating`, `NetworkSecurityPerimeterConfigurationProvisioningStateDeleting`, `NetworkSecurityPerimeterConfigurationProvisioningStateFailed`, `NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded`, `NetworkSecurityPerimeterConfigurationProvisioningStateUpdating`
- New enum type `ResourceAssociationAccessMode` with values `ResourceAssociationAccessModeAudit`, `ResourceAssociationAccessModeEnforced`, `ResourceAssociationAccessModeLearning`
- New enum type `SecurityEncryptionTypes` with values `SecurityEncryptionTypesNonPersistedTPM`, `SecurityEncryptionTypesVMGuestStateOnly`
- New enum type `SecurityTypes` with values `SecurityTypesConfidentialVM`, `SecurityTypesTrustedLaunch`
- New enum type `Severity` with values `SeverityError`, `SeverityWarning`
- New function `*ClientFactory.NewNetworkSecurityPerimeterClient() *NetworkSecurityPerimeterClient`
- New function `NewNetworkSecurityPerimeterClient(string, azcore.TokenCredential, *arm.ClientOptions) (*NetworkSecurityPerimeterClient, error)`
- New function `*NetworkSecurityPerimeterClient.GetConfiguration(context.Context, string, string, string, *NetworkSecurityPerimeterClientGetConfigurationOptions) (NetworkSecurityPerimeterClientGetConfigurationResponse, error)`
- New function `*NetworkSecurityPerimeterClient.NewListConfigurationsPager(string, string, *NetworkSecurityPerimeterClientListConfigurationsOptions) *runtime.Pager[NetworkSecurityPerimeterClientListConfigurationsResponse]`
- New function `*NetworkSecurityPerimeterClient.BeginReconcileConfiguration(context.Context, string, string, string, *NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions) (*runtime.Poller[NetworkSecurityPerimeterClientReconcileConfigurationResponse], error)`
- New struct `AccessRule`
- New struct `AccessRuleProperties`
- New struct `AccessRulePropertiesSubscriptionsItem`
- New struct `AzureProxyResource`
- New struct `AzureResource`
- New struct `ContainerHostBatchBindMountEntry`
- New struct `ErrorAdditionalInfo`
- New struct `ErrorDetail`
- New struct `ErrorResponse`
- New struct `NetworkSecurityPerimeter`
- New struct `NetworkSecurityPerimeterConfiguration`
- New struct `NetworkSecurityPerimeterConfigurationListResult`
- New struct `NetworkSecurityPerimeterConfigurationProperties`
- New struct `NetworkSecurityProfile`
- New struct `ProvisioningIssue`
- New struct `ProvisioningIssueProperties`
- New struct `ResourceAssociation`
- New struct `SystemData`
- New struct `VMDiskSecurityProfile`
- New field `Tags` in struct `Application`
- New field `Tags` in struct `ApplicationPackage`
- New field `Tags` in struct `Certificate`
- New field `Tags` in struct `CertificateCreateOrUpdateParameters`
- New field `Tags` in struct `DetectorResponse`
- New field `CommunityGalleryImageID`, `SharedGalleryImageID` in struct `ImageReference`
- New field `SecurityProfile` in struct `ManagedDisk`
- New field `Tags` in struct `Pool`
- New field `Tags` in struct `PrivateEndpointConnection`
- New field `Tags` in struct `PrivateLinkResource`
- New field `SystemData` in struct `ProxyResource`
- New field `SystemData` in struct `Resource`
- New field `ContainerHostBatchBindMounts` in struct `TaskContainerSettings`
## 2.3.0 (2024-03-22)
### Features Added

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

@ -1,6 +1,6 @@
# Azure Batch Module for Go
[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3)
The `armbatch` module provides operations for working with Azure Batch.
@ -20,7 +20,7 @@ This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for ve
Install the Azure Batch module:
```sh
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3
```
## Authorization

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

@ -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 2024-02-01
// Generated from API version 2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

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

@ -15,10 +15,10 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountCreate_BYOS.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountCreate_Default.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountCreate_SystemAssignedIdentity.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountCreate_UserAssignedIdentity.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateBatchAccountCreate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountDelete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateBatchAccountGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountListByResourceGroup.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountSynchronizeAutoStorageKeys.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountRegenerateKey.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountGetKeys.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/DetectorList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/DetectorGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json
func ExampleAccountClient_NewListOutboundNetworkDependenciesEndpointsPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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.
@ -296,7 +296,7 @@ func (client *ApplicationClient) listCreateRequest(ctx context.Context, resource
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
if options != nil && options.Maxresults != nil {
reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10))
}
@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, parameters); err != nil {

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

@ -15,10 +15,10 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationCreate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationDelete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationList.json
func ExampleApplicationClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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.
@ -403,7 +403,7 @@ func (client *ApplicationPackageClient) listCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
if options != nil && options.Maxresults != nil {
reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10))
}

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

@ -15,10 +15,10 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageActivate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageCreate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageDelete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageList.json
func ExampleApplicationPackageClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -5,9 +5,9 @@
``` yaml
azure-arm: true
require:
- https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/readme.md
- https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/readme.go.md
- https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/readme.md
- https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/readme.go.md
license-header: MICROSOFT_MIT_NO_VERSION
module-version: 2.3.0
tag: package-2024-02
module-version: 3.0.0
tag: package-2024-07
```

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

@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -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 2024-02-01
// Generated from API version 2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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
@ -429,7 +429,7 @@ func (client *CertificateClient) listByBatchAccountCreateRequest(ctx context.Con
if options != nil && options.Select != nil {
reqQP.Set("$select", *options.Select)
}
reqQP.Set("api-version", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
if options != nil && options.Maxresults != nil {
reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10))
}
@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {

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

@ -15,10 +15,10 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateListWithFilter.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateCreate_Full.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateCreate_MinimalCer.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateCreate_Minimal.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateDelete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateGetWithDeletionError.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateCancelDeletion.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/CertificateCancelDeletion.json
func ExampleCertificateClient_CancelDeletion() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -76,6 +76,14 @@ func (c *ClientFactory) NewLocationClient() *LocationClient {
}
}
// NewNetworkSecurityPerimeterClient creates a new instance of NetworkSecurityPerimeterClient.
func (c *ClientFactory) NewNetworkSecurityPerimeterClient() *NetworkSecurityPerimeterClient {
return &NetworkSecurityPerimeterClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
}
// NewOperationsClient creates a new instance of OperationsClient.
func (c *ClientFactory) NewOperationsClient() *OperationsClient {
return &OperationsClient{

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

@ -10,9 +10,27 @@ package armbatch
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
moduleVersion = "v2.3.0"
moduleVersion = "v3.0.0"
)
// AccessRuleDirection - Direction of Access Rule
type AccessRuleDirection string
const (
// AccessRuleDirectionInbound - Applies to inbound network traffic to the secured resources.
AccessRuleDirectionInbound AccessRuleDirection = "Inbound"
// AccessRuleDirectionOutbound - Applies to outbound network traffic from the secured resources
AccessRuleDirectionOutbound AccessRuleDirection = "Outbound"
)
// PossibleAccessRuleDirectionValues returns the possible values for the AccessRuleDirection const type.
func PossibleAccessRuleDirectionValues() []AccessRuleDirection {
return []AccessRuleDirection{
AccessRuleDirectionInbound,
AccessRuleDirectionOutbound,
}
}
// AccountKeyType - The type of account key to regenerate.
type AccountKeyType string
@ -182,12 +200,10 @@ func PossibleCertificateProvisioningStateValues() []CertificateProvisioningState
}
// CertificateStoreLocation - The default value is currentUser. This property is applicable only for pools configured with
// Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a
// Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory
// and an environment variable AZBATCHCERTIFICATES_DIR is supplied to the
// task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the
// user's home directory (e.g., /home/{user-name}/certs) and certificates are
// placed in that directory.
// Windows compute nodes. For Linux compute nodes, the certificates are stored in a directory inside the task
// working directory and an environment variable AZBATCHCERTIFICATES_DIR is supplied to the task to query for this location.
// For certificates with visibility of 'remoteUser', a 'certs' directory is
// created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.
type CertificateStoreLocation string
const (
@ -276,6 +292,36 @@ func PossibleComputeNodeFillTypeValues() []ComputeNodeFillType {
}
}
// ContainerHostDataPath - The paths which will be mounted to container task's container.
type ContainerHostDataPath string
const (
// ContainerHostDataPathApplications - The applications path.
ContainerHostDataPathApplications ContainerHostDataPath = "Applications"
// ContainerHostDataPathJobPrep - The job-prep task path.
ContainerHostDataPathJobPrep ContainerHostDataPath = "JobPrep"
// ContainerHostDataPathShared - The path for multi-instances task to shared their files.
ContainerHostDataPathShared ContainerHostDataPath = "Shared"
// ContainerHostDataPathStartup - The path for start task.
ContainerHostDataPathStartup ContainerHostDataPath = "Startup"
// ContainerHostDataPathTask - The task path.
ContainerHostDataPathTask ContainerHostDataPath = "Task"
// ContainerHostDataPathVfsMounts - The path contains all virtual file systems are mounted on this node.
ContainerHostDataPathVfsMounts ContainerHostDataPath = "VfsMounts"
)
// PossibleContainerHostDataPathValues returns the possible values for the ContainerHostDataPath const type.
func PossibleContainerHostDataPathValues() []ContainerHostDataPath {
return []ContainerHostDataPath{
ContainerHostDataPathApplications,
ContainerHostDataPathJobPrep,
ContainerHostDataPathShared,
ContainerHostDataPathStartup,
ContainerHostDataPathTask,
ContainerHostDataPathVfsMounts,
}
}
// ContainerType - The container technology to be used.
type ContainerType string
@ -314,6 +360,26 @@ func PossibleContainerWorkingDirectoryValues() []ContainerWorkingDirectory {
}
}
// CreatedByType - The type of identity that created the resource.
type CreatedByType string
const (
CreatedByTypeApplication CreatedByType = "Application"
CreatedByTypeKey CreatedByType = "Key"
CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
CreatedByTypeUser CreatedByType = "User"
)
// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
func PossibleCreatedByTypeValues() []CreatedByType {
return []CreatedByType{
CreatedByTypeApplication,
CreatedByTypeKey,
CreatedByTypeManagedIdentity,
CreatedByTypeUser,
}
}
// DiskEncryptionTarget - If omitted, no disks on the compute nodes in the pool will be encrypted.
type DiskEncryptionTarget string
@ -448,6 +514,33 @@ func PossibleInterNodeCommunicationStateValues() []InterNodeCommunicationState {
}
}
// IssueType - Type of issue
type IssueType string
const (
// IssueTypeConfigurationPropagationFailure - An error occurred while applying the network security perimeter (NSP) configuration.
IssueTypeConfigurationPropagationFailure IssueType = "ConfigurationPropagationFailure"
// IssueTypeMissingIdentityConfiguration - An managed identity hasn't been associated with the resource. The resource will
// still be able to validate inbound traffic from the network security perimeter (NSP) or matching inbound access rules, but
// it won't be able to perform outbound access as a member of the NSP.
IssueTypeMissingIdentityConfiguration IssueType = "MissingIdentityConfiguration"
// IssueTypeMissingPerimeterConfiguration - A network connectivity issue is happening on the resource which could be addressed
// either by adding new resources to the network security perimeter (NSP) or by modifying access rules.
IssueTypeMissingPerimeterConfiguration IssueType = "MissingPerimeterConfiguration"
// IssueTypeUnknown - Unknown issue type
IssueTypeUnknown IssueType = "Unknown"
)
// PossibleIssueTypeValues returns the possible values for the IssueType const type.
func PossibleIssueTypeValues() []IssueType {
return []IssueType{
IssueTypeConfigurationPropagationFailure,
IssueTypeMissingIdentityConfiguration,
IssueTypeMissingPerimeterConfiguration,
IssueTypeUnknown,
}
}
// KeySource - Type of the key source.
type KeySource string
@ -468,8 +561,7 @@ func PossibleKeySourceValues() []KeySource {
}
}
// LoginMode - Specifies login mode for the user. The default value for VirtualMachineConfiguration pools is interactive mode
// and for CloudServiceConfiguration pools is batch mode.
// LoginMode - Specifies login mode for the user. The default value is Interactive.
type LoginMode string
const (
@ -526,6 +618,33 @@ func PossibleNetworkSecurityGroupRuleAccessValues() []NetworkSecurityGroupRuleAc
}
}
// NetworkSecurityPerimeterConfigurationProvisioningState - Provisioning state of a network security perimeter configuration
// that is being created or updated.
type NetworkSecurityPerimeterConfigurationProvisioningState string
const (
NetworkSecurityPerimeterConfigurationProvisioningStateAccepted NetworkSecurityPerimeterConfigurationProvisioningState = "Accepted"
NetworkSecurityPerimeterConfigurationProvisioningStateCanceled NetworkSecurityPerimeterConfigurationProvisioningState = "Canceled"
NetworkSecurityPerimeterConfigurationProvisioningStateCreating NetworkSecurityPerimeterConfigurationProvisioningState = "Creating"
NetworkSecurityPerimeterConfigurationProvisioningStateDeleting NetworkSecurityPerimeterConfigurationProvisioningState = "Deleting"
NetworkSecurityPerimeterConfigurationProvisioningStateFailed NetworkSecurityPerimeterConfigurationProvisioningState = "Failed"
NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded NetworkSecurityPerimeterConfigurationProvisioningState = "Succeeded"
NetworkSecurityPerimeterConfigurationProvisioningStateUpdating NetworkSecurityPerimeterConfigurationProvisioningState = "Updating"
)
// PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues returns the possible values for the NetworkSecurityPerimeterConfigurationProvisioningState const type.
func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues() []NetworkSecurityPerimeterConfigurationProvisioningState {
return []NetworkSecurityPerimeterConfigurationProvisioningState{
NetworkSecurityPerimeterConfigurationProvisioningStateAccepted,
NetworkSecurityPerimeterConfigurationProvisioningStateCanceled,
NetworkSecurityPerimeterConfigurationProvisioningStateCreating,
NetworkSecurityPerimeterConfigurationProvisioningStateDeleting,
NetworkSecurityPerimeterConfigurationProvisioningStateFailed,
NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded,
NetworkSecurityPerimeterConfigurationProvisioningStateUpdating,
}
}
// NodeCommunicationMode - Determines how a pool communicates with the Batch service.
type NodeCommunicationMode string
@ -741,6 +860,8 @@ const (
PublicNetworkAccessTypeDisabled PublicNetworkAccessType = "Disabled"
// PublicNetworkAccessTypeEnabled - Enables connectivity to Azure Batch through public DNS.
PublicNetworkAccessTypeEnabled PublicNetworkAccessType = "Enabled"
// PublicNetworkAccessTypeSecuredByPerimeter - Secures connectivity to Azure Batch through NSP configuration.
PublicNetworkAccessTypeSecuredByPerimeter PublicNetworkAccessType = "SecuredByPerimeter"
)
// PossiblePublicNetworkAccessTypeValues returns the possible values for the PublicNetworkAccessType const type.
@ -748,6 +869,30 @@ func PossiblePublicNetworkAccessTypeValues() []PublicNetworkAccessType {
return []PublicNetworkAccessType{
PublicNetworkAccessTypeDisabled,
PublicNetworkAccessTypeEnabled,
PublicNetworkAccessTypeSecuredByPerimeter,
}
}
// ResourceAssociationAccessMode - Access mode of the resource association
type ResourceAssociationAccessMode string
const (
// ResourceAssociationAccessModeAudit - Audit access mode - traffic to the resource that fails access checks is logged but
// not blocked
ResourceAssociationAccessModeAudit ResourceAssociationAccessMode = "Audit"
// ResourceAssociationAccessModeEnforced - Enforced access mode - traffic to the resource that failed access checks is blocked
ResourceAssociationAccessModeEnforced ResourceAssociationAccessMode = "Enforced"
// ResourceAssociationAccessModeLearning - Learning access mode - traffic to the resource is enabled for analysis but not
// blocked
ResourceAssociationAccessModeLearning ResourceAssociationAccessMode = "Learning"
)
// PossibleResourceAssociationAccessModeValues returns the possible values for the ResourceAssociationAccessMode const type.
func PossibleResourceAssociationAccessModeValues() []ResourceAssociationAccessMode {
return []ResourceAssociationAccessMode{
ResourceAssociationAccessModeAudit,
ResourceAssociationAccessModeEnforced,
ResourceAssociationAccessModeLearning,
}
}
@ -773,6 +918,61 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
}
}
// SecurityEncryptionTypes - Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption
// of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState
// blob. Note: It can be set for only Confidential VMs and required when using Confidential VMs.
type SecurityEncryptionTypes string
const (
SecurityEncryptionTypesNonPersistedTPM SecurityEncryptionTypes = "NonPersistedTPM"
SecurityEncryptionTypesVMGuestStateOnly SecurityEncryptionTypes = "VMGuestStateOnly"
)
// PossibleSecurityEncryptionTypesValues returns the possible values for the SecurityEncryptionTypes const type.
func PossibleSecurityEncryptionTypesValues() []SecurityEncryptionTypes {
return []SecurityEncryptionTypes{
SecurityEncryptionTypesNonPersistedTPM,
SecurityEncryptionTypesVMGuestStateOnly,
}
}
// SecurityTypes - Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.
type SecurityTypes string
const (
// SecurityTypesConfidentialVM - Azure confidential computing offers confidential VMs are for tenants with high security and
// confidentiality requirements. These VMs provide a strong, hardware-enforced boundary to help meet your security needs.
// You can use confidential VMs for migrations without making changes to your code, with the platform protecting your VM's
// state from being read or modified.
SecurityTypesConfidentialVM SecurityTypes = "confidentialVM"
// SecurityTypesTrustedLaunch - Trusted launch protects against advanced and persistent attack techniques.
SecurityTypesTrustedLaunch SecurityTypes = "trustedLaunch"
)
// PossibleSecurityTypesValues returns the possible values for the SecurityTypes const type.
func PossibleSecurityTypesValues() []SecurityTypes {
return []SecurityTypes{
SecurityTypesConfidentialVM,
SecurityTypesTrustedLaunch,
}
}
// Severity - Severity of the issue.
type Severity string
const (
SeverityError Severity = "Error"
SeverityWarning Severity = "Warning"
)
// PossibleSeverityValues returns the possible values for the Severity const type.
func PossibleSeverityValues() []Severity {
return []Severity{
SeverityError,
SeverityWarning,
}
}
// StorageAccountType - The storage account type for use in creating data disks or OS disk.
type StorageAccountType string

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

@ -16,7 +16,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"regexp"

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

@ -16,7 +16,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"reflect"

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

@ -16,7 +16,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"reflect"

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

@ -16,7 +16,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"regexp"

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

@ -16,7 +16,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"regexp"
@ -33,10 +33,6 @@ type LocationServer struct {
// HTTP status codes to indicate success: http.StatusOK
GetQuotas func(ctx context.Context, locationName string, options *armbatch.LocationClientGetQuotasOptions) (resp azfake.Responder[armbatch.LocationClientGetQuotasResponse], errResp azfake.ErrorResponder)
// NewListSupportedCloudServiceSKUsPager is the fake for method LocationClient.NewListSupportedCloudServiceSKUsPager
// HTTP status codes to indicate success: http.StatusOK
NewListSupportedCloudServiceSKUsPager func(locationName string, options *armbatch.LocationClientListSupportedCloudServiceSKUsOptions) (resp azfake.PagerResponder[armbatch.LocationClientListSupportedCloudServiceSKUsResponse])
// NewListSupportedVirtualMachineSKUsPager is the fake for method LocationClient.NewListSupportedVirtualMachineSKUsPager
// HTTP status codes to indicate success: http.StatusOK
NewListSupportedVirtualMachineSKUsPager func(locationName string, options *armbatch.LocationClientListSupportedVirtualMachineSKUsOptions) (resp azfake.PagerResponder[armbatch.LocationClientListSupportedVirtualMachineSKUsResponse])
@ -48,7 +44,6 @@ type LocationServer struct {
func NewLocationServerTransport(srv *LocationServer) *LocationServerTransport {
return &LocationServerTransport{
srv: srv,
newListSupportedCloudServiceSKUsPager: newTracker[azfake.PagerResponder[armbatch.LocationClientListSupportedCloudServiceSKUsResponse]](),
newListSupportedVirtualMachineSKUsPager: newTracker[azfake.PagerResponder[armbatch.LocationClientListSupportedVirtualMachineSKUsResponse]](),
}
}
@ -57,7 +52,6 @@ func NewLocationServerTransport(srv *LocationServer) *LocationServerTransport {
// Don't use this type directly, use NewLocationServerTransport instead.
type LocationServerTransport struct {
srv *LocationServer
newListSupportedCloudServiceSKUsPager *tracker[azfake.PagerResponder[armbatch.LocationClientListSupportedCloudServiceSKUsResponse]]
newListSupportedVirtualMachineSKUsPager *tracker[azfake.PagerResponder[armbatch.LocationClientListSupportedVirtualMachineSKUsResponse]]
}
@ -77,8 +71,6 @@ func (l *LocationServerTransport) Do(req *http.Request) (*http.Response, error)
resp, err = l.dispatchCheckNameAvailability(req)
case "LocationClient.GetQuotas":
resp, err = l.dispatchGetQuotas(req)
case "LocationClient.NewListSupportedCloudServiceSKUsPager":
resp, err = l.dispatchNewListSupportedCloudServiceSKUsPager(req)
case "LocationClient.NewListSupportedVirtualMachineSKUsPager":
resp, err = l.dispatchNewListSupportedVirtualMachineSKUsPager(req)
default:
@ -154,70 +146,6 @@ func (l *LocationServerTransport) dispatchGetQuotas(req *http.Request) (*http.Re
return resp, nil
}
func (l *LocationServerTransport) dispatchNewListSupportedCloudServiceSKUsPager(req *http.Request) (*http.Response, error) {
if l.srv.NewListSupportedCloudServiceSKUsPager == nil {
return nil, &nonRetriableError{errors.New("fake for method NewListSupportedCloudServiceSKUsPager not implemented")}
}
newListSupportedCloudServiceSKUsPager := l.newListSupportedCloudServiceSKUsPager.get(req)
if newListSupportedCloudServiceSKUsPager == nil {
const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Batch/locations/(?P<locationName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cloudServiceSkus`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
if matches == nil || len(matches) < 2 {
return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
}
qp := req.URL.Query()
locationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("locationName")])
if err != nil {
return nil, err
}
maxresultsUnescaped, err := url.QueryUnescape(qp.Get("maxresults"))
if err != nil {
return nil, err
}
maxresultsParam, err := parseOptional(maxresultsUnescaped, func(v string) (int32, error) {
p, parseErr := strconv.ParseInt(v, 10, 32)
if parseErr != nil {
return 0, parseErr
}
return int32(p), nil
})
if err != nil {
return nil, err
}
filterUnescaped, err := url.QueryUnescape(qp.Get("$filter"))
if err != nil {
return nil, err
}
filterParam := getOptional(filterUnescaped)
var options *armbatch.LocationClientListSupportedCloudServiceSKUsOptions
if maxresultsParam != nil || filterParam != nil {
options = &armbatch.LocationClientListSupportedCloudServiceSKUsOptions{
Maxresults: maxresultsParam,
Filter: filterParam,
}
}
resp := l.srv.NewListSupportedCloudServiceSKUsPager(locationNameParam, options)
newListSupportedCloudServiceSKUsPager = &resp
l.newListSupportedCloudServiceSKUsPager.add(req, newListSupportedCloudServiceSKUsPager)
server.PagerResponderInjectNextLinks(newListSupportedCloudServiceSKUsPager, req, func(page *armbatch.LocationClientListSupportedCloudServiceSKUsResponse, createLink func() string) {
page.NextLink = to.Ptr(createLink())
})
}
resp, err := server.PagerResponderNext(newListSupportedCloudServiceSKUsPager, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK}, resp.StatusCode) {
l.newListSupportedCloudServiceSKUsPager.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)}
}
if !server.PagerResponderMore(newListSupportedCloudServiceSKUsPager) {
l.newListSupportedCloudServiceSKUsPager.remove(req)
}
return resp, nil
}
func (l *LocationServerTransport) dispatchNewListSupportedVirtualMachineSKUsPager(req *http.Request) (*http.Response, error) {
if l.srv.NewListSupportedVirtualMachineSKUsPager == nil {
return nil, &nonRetriableError{errors.New("fake for method NewListSupportedVirtualMachineSKUsPager not implemented")}

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

@ -0,0 +1,212 @@
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package fake
import (
"context"
"errors"
"fmt"
azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"regexp"
)
// NetworkSecurityPerimeterServer is a fake server for instances of the armbatch.NetworkSecurityPerimeterClient type.
type NetworkSecurityPerimeterServer struct {
// GetConfiguration is the fake for method NetworkSecurityPerimeterClient.GetConfiguration
// HTTP status codes to indicate success: http.StatusOK
GetConfiguration func(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *armbatch.NetworkSecurityPerimeterClientGetConfigurationOptions) (resp azfake.Responder[armbatch.NetworkSecurityPerimeterClientGetConfigurationResponse], errResp azfake.ErrorResponder)
// NewListConfigurationsPager is the fake for method NetworkSecurityPerimeterClient.NewListConfigurationsPager
// HTTP status codes to indicate success: http.StatusOK
NewListConfigurationsPager func(resourceGroupName string, accountName string, options *armbatch.NetworkSecurityPerimeterClientListConfigurationsOptions) (resp azfake.PagerResponder[armbatch.NetworkSecurityPerimeterClientListConfigurationsResponse])
// BeginReconcileConfiguration is the fake for method NetworkSecurityPerimeterClient.BeginReconcileConfiguration
// HTTP status codes to indicate success: http.StatusAccepted
BeginReconcileConfiguration func(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *armbatch.NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions) (resp azfake.PollerResponder[armbatch.NetworkSecurityPerimeterClientReconcileConfigurationResponse], errResp azfake.ErrorResponder)
}
// NewNetworkSecurityPerimeterServerTransport creates a new instance of NetworkSecurityPerimeterServerTransport with the provided implementation.
// The returned NetworkSecurityPerimeterServerTransport instance is connected to an instance of armbatch.NetworkSecurityPerimeterClient via the
// azcore.ClientOptions.Transporter field in the client's constructor parameters.
func NewNetworkSecurityPerimeterServerTransport(srv *NetworkSecurityPerimeterServer) *NetworkSecurityPerimeterServerTransport {
return &NetworkSecurityPerimeterServerTransport{
srv: srv,
newListConfigurationsPager: newTracker[azfake.PagerResponder[armbatch.NetworkSecurityPerimeterClientListConfigurationsResponse]](),
beginReconcileConfiguration: newTracker[azfake.PollerResponder[armbatch.NetworkSecurityPerimeterClientReconcileConfigurationResponse]](),
}
}
// NetworkSecurityPerimeterServerTransport connects instances of armbatch.NetworkSecurityPerimeterClient to instances of NetworkSecurityPerimeterServer.
// Don't use this type directly, use NewNetworkSecurityPerimeterServerTransport instead.
type NetworkSecurityPerimeterServerTransport struct {
srv *NetworkSecurityPerimeterServer
newListConfigurationsPager *tracker[azfake.PagerResponder[armbatch.NetworkSecurityPerimeterClientListConfigurationsResponse]]
beginReconcileConfiguration *tracker[azfake.PollerResponder[armbatch.NetworkSecurityPerimeterClientReconcileConfigurationResponse]]
}
// Do implements the policy.Transporter interface for NetworkSecurityPerimeterServerTransport.
func (n *NetworkSecurityPerimeterServerTransport) Do(req *http.Request) (*http.Response, error) {
rawMethod := req.Context().Value(runtime.CtxAPINameKey{})
method, ok := rawMethod.(string)
if !ok {
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
}
var resp *http.Response
var err error
switch method {
case "NetworkSecurityPerimeterClient.GetConfiguration":
resp, err = n.dispatchGetConfiguration(req)
case "NetworkSecurityPerimeterClient.NewListConfigurationsPager":
resp, err = n.dispatchNewListConfigurationsPager(req)
case "NetworkSecurityPerimeterClient.BeginReconcileConfiguration":
resp, err = n.dispatchBeginReconcileConfiguration(req)
default:
err = fmt.Errorf("unhandled API %s", method)
}
if err != nil {
return nil, err
}
return resp, nil
}
func (n *NetworkSecurityPerimeterServerTransport) dispatchGetConfiguration(req *http.Request) (*http.Response, error) {
if n.srv.GetConfiguration == nil {
return nil, &nonRetriableError{errors.New("fake for method GetConfiguration not implemented")}
}
const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P<resourceGroupName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Batch/batchAccounts/(?P<accountName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkSecurityPerimeterConfigurations/(?P<networkSecurityPerimeterConfigurationName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
if matches == nil || len(matches) < 4 {
return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
}
resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")])
if err != nil {
return nil, err
}
accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")])
if err != nil {
return nil, err
}
networkSecurityPerimeterConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityPerimeterConfigurationName")])
if err != nil {
return nil, err
}
respr, errRespr := n.srv.GetConfiguration(req.Context(), resourceGroupNameParam, accountNameParam, networkSecurityPerimeterConfigurationNameParam, nil)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
respContent := server.GetResponseContent(respr)
if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
}
resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkSecurityPerimeterConfiguration, req)
if err != nil {
return nil, err
}
return resp, nil
}
func (n *NetworkSecurityPerimeterServerTransport) dispatchNewListConfigurationsPager(req *http.Request) (*http.Response, error) {
if n.srv.NewListConfigurationsPager == nil {
return nil, &nonRetriableError{errors.New("fake for method NewListConfigurationsPager not implemented")}
}
newListConfigurationsPager := n.newListConfigurationsPager.get(req)
if newListConfigurationsPager == nil {
const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P<resourceGroupName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Batch/batchAccounts/(?P<accountName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkSecurityPerimeterConfigurations`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
if matches == nil || len(matches) < 3 {
return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
}
resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")])
if err != nil {
return nil, err
}
accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")])
if err != nil {
return nil, err
}
resp := n.srv.NewListConfigurationsPager(resourceGroupNameParam, accountNameParam, nil)
newListConfigurationsPager = &resp
n.newListConfigurationsPager.add(req, newListConfigurationsPager)
server.PagerResponderInjectNextLinks(newListConfigurationsPager, req, func(page *armbatch.NetworkSecurityPerimeterClientListConfigurationsResponse, createLink func() string) {
page.NextLink = to.Ptr(createLink())
})
}
resp, err := server.PagerResponderNext(newListConfigurationsPager, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK}, resp.StatusCode) {
n.newListConfigurationsPager.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)}
}
if !server.PagerResponderMore(newListConfigurationsPager) {
n.newListConfigurationsPager.remove(req)
}
return resp, nil
}
func (n *NetworkSecurityPerimeterServerTransport) dispatchBeginReconcileConfiguration(req *http.Request) (*http.Response, error) {
if n.srv.BeginReconcileConfiguration == nil {
return nil, &nonRetriableError{errors.New("fake for method BeginReconcileConfiguration not implemented")}
}
beginReconcileConfiguration := n.beginReconcileConfiguration.get(req)
if beginReconcileConfiguration == nil {
const regexStr = `/subscriptions/(?P<subscriptionId>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P<resourceGroupName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Batch/batchAccounts/(?P<accountName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkSecurityPerimeterConfigurations/(?P<networkSecurityPerimeterConfigurationName>[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reconcile`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
if matches == nil || len(matches) < 4 {
return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
}
resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")])
if err != nil {
return nil, err
}
accountNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("accountName")])
if err != nil {
return nil, err
}
networkSecurityPerimeterConfigurationNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("networkSecurityPerimeterConfigurationName")])
if err != nil {
return nil, err
}
respr, errRespr := n.srv.BeginReconcileConfiguration(req.Context(), resourceGroupNameParam, accountNameParam, networkSecurityPerimeterConfigurationNameParam, nil)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
beginReconcileConfiguration = &respr
n.beginReconcileConfiguration.add(req, beginReconcileConfiguration)
}
resp, err := server.PollerResponderNext(beginReconcileConfiguration, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusAccepted}, resp.StatusCode) {
n.beginReconcileConfiguration.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)}
}
if !server.PollerResponderMore(beginReconcileConfiguration) {
n.beginReconcileConfiguration.remove(req)
}
return resp, nil
}

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

@ -15,7 +15,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
)

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

@ -16,7 +16,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"regexp"

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

@ -16,7 +16,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"regexp"

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

@ -16,7 +16,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
"net/http"
"net/url"
"regexp"

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

@ -24,6 +24,7 @@ type ServerFactory struct {
ApplicationPackageServer ApplicationPackageServer
CertificateServer CertificateServer
LocationServer LocationServer
NetworkSecurityPerimeterServer NetworkSecurityPerimeterServer
OperationsServer OperationsServer
PoolServer PoolServer
PrivateEndpointConnectionServer PrivateEndpointConnectionServer
@ -49,6 +50,7 @@ type ServerFactoryTransport struct {
trApplicationPackageServer *ApplicationPackageServerTransport
trCertificateServer *CertificateServerTransport
trLocationServer *LocationServerTransport
trNetworkSecurityPerimeterServer *NetworkSecurityPerimeterServerTransport
trOperationsServer *OperationsServerTransport
trPoolServer *PoolServerTransport
trPrivateEndpointConnectionServer *PrivateEndpointConnectionServerTransport
@ -85,6 +87,11 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) {
case "LocationClient":
initServer(s, &s.trLocationServer, func() *LocationServerTransport { return NewLocationServerTransport(&s.srv.LocationServer) })
resp, err = s.trLocationServer.Do(req)
case "NetworkSecurityPerimeterClient":
initServer(s, &s.trNetworkSecurityPerimeterServer, func() *NetworkSecurityPerimeterServerTransport {
return NewNetworkSecurityPerimeterServerTransport(&s.srv.NetworkSecurityPerimeterServer)
})
resp, err = s.trNetworkSecurityPerimeterServer.Do(req)
case "OperationsClient":
initServer(s, &s.trOperationsServer, func() *OperationsServerTransport { return NewOperationsServerTransport(&s.srv.OperationsServer) })
resp, err = s.trOperationsServer.Do(req)

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

@ -1,4 +1,4 @@
module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2
module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3
go 1.18

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

@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@ -167,77 +167,10 @@ func (client *LocationClient) getQuotasHandleResponse(resp *http.Response) (Loca
return result, nil
}
// NewListSupportedCloudServiceSKUsPager - Gets the list of Batch supported Cloud Service VM sizes available at the given
// location.
//
// Generated from API version 2024-02-01
// - locationName - The region for which to retrieve Batch service supported SKUs.
// - options - LocationClientListSupportedCloudServiceSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedCloudServiceSKUsPager
// method.
func (client *LocationClient) NewListSupportedCloudServiceSKUsPager(locationName string, options *LocationClientListSupportedCloudServiceSKUsOptions) *runtime.Pager[LocationClientListSupportedCloudServiceSKUsResponse] {
return runtime.NewPager(runtime.PagingHandler[LocationClientListSupportedCloudServiceSKUsResponse]{
More: func(page LocationClientListSupportedCloudServiceSKUsResponse) bool {
return page.NextLink != nil && len(*page.NextLink) > 0
},
Fetcher: func(ctx context.Context, page *LocationClientListSupportedCloudServiceSKUsResponse) (LocationClientListSupportedCloudServiceSKUsResponse, error) {
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocationClient.NewListSupportedCloudServiceSKUsPager")
nextLink := ""
if page != nil {
nextLink = *page.NextLink
}
resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
return client.listSupportedCloudServiceSKUsCreateRequest(ctx, locationName, options)
}, nil)
if err != nil {
return LocationClientListSupportedCloudServiceSKUsResponse{}, err
}
return client.listSupportedCloudServiceSKUsHandleResponse(resp)
},
Tracer: client.internal.Tracer(),
})
}
// listSupportedCloudServiceSKUsCreateRequest creates the ListSupportedCloudServiceSKUs request.
func (client *LocationClient) listSupportedCloudServiceSKUsCreateRequest(ctx context.Context, locationName string, options *LocationClientListSupportedCloudServiceSKUsOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/cloudServiceSkus"
if locationName == "" {
return nil, errors.New("parameter locationName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName))
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
if options != nil && options.Filter != nil {
reqQP.Set("$filter", *options.Filter)
}
reqQP.Set("api-version", "2024-02-01")
if options != nil && options.Maxresults != nil {
reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10))
}
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// listSupportedCloudServiceSKUsHandleResponse handles the ListSupportedCloudServiceSKUs response.
func (client *LocationClient) listSupportedCloudServiceSKUsHandleResponse(resp *http.Response) (LocationClientListSupportedCloudServiceSKUsResponse, error) {
result := LocationClientListSupportedCloudServiceSKUsResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.SupportedSKUsResult); err != nil {
return LocationClientListSupportedCloudServiceSKUsResponse{}, err
}
return result, nil
}
// NewListSupportedVirtualMachineSKUsPager - Gets the list of Batch supported Virtual Machine VM sizes available at the given
// location.
//
// Generated from API version 2024-02-01
// Generated from API version 2024-07-01
// - locationName - The region for which to retrieve Batch service supported SKUs.
// - options - LocationClientListSupportedVirtualMachineSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedVirtualMachineSKUsPager
// method.
@ -283,7 +216,7 @@ func (client *LocationClient) listSupportedVirtualMachineSKUsCreateRequest(ctx c
if options != nil && options.Filter != nil {
reqQP.Set("$filter", *options.Filter)
}
reqQP.Set("api-version", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
if options != nil && options.Maxresults != nil {
reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10))
}

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

@ -15,10 +15,10 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/LocationGetQuotas.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/LocationListVirtualMachineSkus.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationListVirtualMachineSkus.json
func ExampleLocationClient_NewListSupportedVirtualMachineSKUsPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -190,70 +190,7 @@ func ExampleLocationClient_NewListSupportedVirtualMachineSKUsPager() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/LocationListCloudServiceSkus.json
func ExampleLocationClient_NewListSupportedCloudServiceSKUsPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewLocationClient().NewListSupportedCloudServiceSKUsPager("japaneast", &armbatch.LocationClientListSupportedCloudServiceSKUsOptions{Maxresults: nil,
Filter: nil,
})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.SupportedSKUsResult = armbatch.SupportedSKUsResult{
// Value: []*armbatch.SupportedSKU{
// {
// Name: to.Ptr("Small"),
// Capabilities: []*armbatch.SKUCapability{
// {
// Name: to.Ptr("MaxResourceVolumeMB"),
// Value: to.Ptr("20480"),
// },
// {
// Name: to.Ptr("vCPUs"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("HyperVGenerations"),
// Value: to.Ptr("V1"),
// },
// {
// Name: to.Ptr("MemoryGB"),
// Value: to.Ptr("0.75"),
// },
// {
// Name: to.Ptr("LowPriorityCapable"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("vCPUsAvailable"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("EphemeralOSDiskSupported"),
// Value: to.Ptr("False"),
// }},
// FamilyName: to.Ptr("standardA0_A7Family"),
// }},
// }
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/LocationCheckNameAvailability_AlreadyExists.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationCheckNameAvailability_AlreadyExists.json
func ExampleLocationClient_CheckNameAvailability_locationCheckNameAvailabilityAlreadyExists() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -281,7 +218,7 @@ func ExampleLocationClient_CheckNameAvailability_locationCheckNameAvailabilityAl
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/LocationCheckNameAvailability_Available.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationCheckNameAvailability_Available.json
func ExampleLocationClient_CheckNameAvailability_locationCheckNameAvailabilityAvailable() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -10,6 +10,45 @@ package armbatch
import "time"
// AccessRule - Access rule in a network security perimeter configuration profile
type AccessRule struct {
// Name of the access rule
Name *string
// Properties of Access Rule
Properties *AccessRuleProperties
}
// AccessRuleProperties - Properties of Access Rule
type AccessRuleProperties struct {
// Address prefixes in the CIDR format for inbound rules
AddressPrefixes []*string
// Direction of Access Rule
Direction *AccessRuleDirection
// Email addresses for outbound rules
EmailAddresses []*string
// Fully qualified domain names (FQDN) for outbound rules
FullyQualifiedDomainNames []*string
// Network security perimeters for inbound rules
NetworkSecurityPerimeters []*NetworkSecurityPerimeter
// Phone numbers for outbound rules
PhoneNumbers []*string
// Subscriptions for inbound rules
Subscriptions []*AccessRulePropertiesSubscriptionsItem
}
// AccessRulePropertiesSubscriptionsItem - Subscription identifiers
type AccessRulePropertiesSubscriptionsItem struct {
// The fully qualified Azure resource ID of the subscription e.g. ('/subscriptions/00000000-0000-0000-0000-000000000000')
ID *string
}
// Account - Contains information about an Azure Batch account.
type Account struct {
// The identity of the Batch account.
@ -229,6 +268,9 @@ type Application struct {
// The properties associated with the Application.
Properties *ApplicationProperties
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
@ -247,6 +289,9 @@ type ApplicationPackage struct {
// The properties associated with the Application Package.
Properties *ApplicationPackageProperties
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
@ -438,6 +483,42 @@ type AzureFileShareConfiguration struct {
MountOptions *string
}
// AzureProxyResource - A definition of an Azure resource.
type AzureProxyResource struct {
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
// READ-ONLY; The ID of the resource.
ID *string
// READ-ONLY; The name of the resource.
Name *string
// READ-ONLY; The type of the resource.
Type *string
}
// AzureResource - A definition of an Azure resource.
type AzureResource struct {
// READ-ONLY; The ID of the resource.
ID *string
// READ-ONLY; The location of the resource.
Location *string
// READ-ONLY; The name of the resource.
Name *string
// READ-ONLY; The tags of the resource.
Tags map[string]*string
// READ-ONLY; The type of the resource.
Type *string
}
// CIFSMountConfiguration - Information used to connect to a CIFS file system.
type CIFSMountConfiguration struct {
// REQUIRED; The password to use for authentication against the CIFS file system.
@ -462,6 +543,9 @@ type Certificate struct {
// The properties associated with the certificate.
Properties *CertificateProperties
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
@ -492,6 +576,9 @@ type CertificateCreateOrUpdateParameters struct {
// The properties associated with the certificate.
Properties *CertificateCreateOrUpdateProperties
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
@ -561,19 +648,16 @@ type CertificateReference struct {
// as the pool.
ID *string
// The default value is currentUser. This property is applicable only for pools configured with Windows nodes (that is, created
// with cloudServiceConfiguration, or with virtualMachineConfiguration using a
// Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory
// and an environment variable AZBATCHCERTIFICATES_DIR is supplied to the
// task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the
// user's home directory (e.g., /home/{user-name}/certs) and certificates are
// placed in that directory.
// The default value is currentUser. This property is applicable only for pools configured with Windows compute nodes. For
// Linux compute nodes, the certificates are stored in a directory inside the task
// working directory and an environment variable AZBATCHCERTIFICATES_DIR is supplied to the task to query for this location.
// For certificates with visibility of 'remoteUser', a 'certs' directory is
// created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.
StoreLocation *CertificateStoreLocation
// This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration,
// or with virtualMachineConfiguration using a Windows image reference). Common
// store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom
// store name can also be used. The default value is My.
// This property is applicable only for pools configured with Windows compute nodes. Common store names include: My, Root,
// CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook,
// but any custom store name can also be used. The default value is My.
StoreName *string
// Which user accounts on the compute node should have access to the private data of the certificate.
@ -604,19 +688,6 @@ type CheckNameAvailabilityResult struct {
Reason *NameAvailabilityReason
}
// CloudServiceConfiguration - The configuration for nodes in a pool based on the Azure Cloud Services platform.
type CloudServiceConfiguration struct {
// REQUIRED; Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to
// Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family
// 5, equivalent to Windows Server 2016. 6 - OS Family 6, equivalent to Windows Server 2019. For more information, see Azure
// Guest OS Releases
// (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases).
OSFamily *string
// The default value is * which specifies the latest operating system version for the specified OS family.
OSVersion *string
}
// ComputeNodeIdentityReference - The reference to a user assigned identity associated with the Batch pool which a compute
// node will use.
type ComputeNodeIdentityReference struct {
@ -638,6 +709,17 @@ type ContainerConfiguration struct {
ContainerRegistries []*ContainerRegistry
}
// ContainerHostBatchBindMountEntry - The entry of path and mount mode you want to mount into task container.
type ContainerHostBatchBindMountEntry struct {
// For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write
// access for the path, it depends on the access in host VM. If this path is
// mounted read-only, all users within the container will not be able to modify the path.
IsReadOnly *bool
// The paths which will be mounted to container task's container.
Source *ContainerHostDataPath
}
// ContainerRegistry - A private container registry.
type ContainerRegistry struct {
// The reference to a user assigned identity associated with the Batch pool which a compute node will use.
@ -692,12 +774,7 @@ type DeleteCertificateError struct {
// DeploymentConfiguration - Deployment configuration properties.
type DeploymentConfiguration struct {
// This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This
// property cannot be specified if the Batch account was created with its
// poolAllocationMode property set to 'UserSubscription'.
CloudServiceConfiguration *CloudServiceConfiguration
// This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.
// The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure.
VirtualMachineConfiguration *VirtualMachineConfiguration
}
@ -715,6 +792,9 @@ type DetectorResponse struct {
// The properties associated with the detector.
Properties *DetectorResponseProperties
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
@ -798,6 +878,40 @@ type EnvironmentSetting struct {
Value *string
}
// ErrorAdditionalInfo - The resource management error additional info.
type ErrorAdditionalInfo struct {
// READ-ONLY; The additional info.
Info any
// READ-ONLY; The additional info type.
Type *string
}
// ErrorDetail - The error detail.
type ErrorDetail struct {
// READ-ONLY; The error additional info.
AdditionalInfo []*ErrorAdditionalInfo
// READ-ONLY; The error code.
Code *string
// READ-ONLY; The error details.
Details []*ErrorDetail
// READ-ONLY; The error message.
Message *string
// READ-ONLY; The error target.
Target *string
}
// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations.
// (This also follows the OData error response format.).
type ErrorResponse struct {
// The error object.
Error *ErrorDetail
}
// FixedScaleSettings - Fixed scale settings for the pool.
type FixedScaleSettings struct {
// If omitted, the default value is Requeue.
@ -829,6 +943,9 @@ 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 and can be fetched from community gallery image GET call.
CommunityGalleryImageID *string
// 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.
@ -843,6 +960,9 @@ type ImageReference struct {
// For example, 18.04-LTS or 2022-datacenter.
SKU *string
// This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call.
SharedGalleryImageID *string
// A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
Version *string
}
@ -977,6 +1097,10 @@ type LocationQuota struct {
}
type ManagedDisk struct {
// Specifies the security profile settings for the managed disk. Note: It can only be set for Confidential VMs and is required
// when using Confidential VMs.
SecurityProfile *VMDiskSecurityProfile
// The storage account type for use in creating data disks or OS disk.
StorageAccountType *StorageAccountType
}
@ -1028,10 +1152,10 @@ type NetworkConfiguration struct {
// https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview.
EnableAcceleratedNetworking *bool
// Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.
// The endpoint configuration for a pool.
EndpointConfiguration *PoolEndpointConfiguration
// This property is only supported on Pools with the virtualMachineConfiguration property.
// The public IP Address configuration of the networking configuration of a Pool.
PublicIPAddressConfiguration *PublicIPAddressConfiguration
// The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should
@ -1044,11 +1168,9 @@ type NetworkConfiguration struct {
// If communication to the compute nodes in the specified subnet is denied by
// an NSG, then the Batch service will set the state of the compute nodes to unusable. If the specified VNet has any associated
// Network Security Groups (NSG), then a few reserved system ports must be
// enabled for inbound communication. For pools created with a virtual machine configuration, enable ports 29876 and 29877,
// as well as port 22 for Linux and port 3389 for Windows. For pools created with
// a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage
// on port 443. For cloudServiceConfiguration pools, only 'classic' VNETs are
// supported. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration
// enabled for inbound communication. Enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows.
// Also enable outbound connections to Azure Storage on port 443. For more details
// see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration
SubnetID *string
}
@ -1084,6 +1206,81 @@ type NetworkSecurityGroupRule struct {
SourcePortRanges []*string
}
// NetworkSecurityPerimeter - Information about a network security perimeter (NSP)
type NetworkSecurityPerimeter struct {
// Fully qualified Azure resource ID of the NSP resource
ID *string
// Location of the network security perimeter
Location *string
// Universal unique ID (UUID) of the network security perimeter
PerimeterGUID *string
}
// NetworkSecurityPerimeterConfiguration - Network security perimeter (NSP) configuration resource
type NetworkSecurityPerimeterConfiguration struct {
// Network security configuration properties.
Properties *NetworkSecurityPerimeterConfigurationProperties
// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
// NetworkSecurityPerimeterConfigurationListResult - Result of a list NSP (network security perimeter) configurations request.
type NetworkSecurityPerimeterConfigurationListResult struct {
// The link used to get the next page of results.
NextLink *string
// Array of network security perimeter results.
Value []*NetworkSecurityPerimeterConfiguration
}
// NetworkSecurityPerimeterConfigurationProperties - Network security configuration properties.
type NetworkSecurityPerimeterConfigurationProperties struct {
// Information about a network security perimeter (NSP)
NetworkSecurityPerimeter *NetworkSecurityPerimeter
// Network security perimeter configuration profile
Profile *NetworkSecurityProfile
// Information about resource association
ResourceAssociation *ResourceAssociation
// READ-ONLY; List of provisioning issues, if any
ProvisioningIssues []*ProvisioningIssue
// READ-ONLY; Provisioning state of a network security perimeter configuration that is being created or updated.
ProvisioningState *NetworkSecurityPerimeterConfigurationProvisioningState
}
// NetworkSecurityProfile - Network security perimeter configuration profile
type NetworkSecurityProfile struct {
// List of Access Rules
AccessRules []*AccessRule
// Current access rules version
AccessRulesVersion *int32
// Current diagnostic settings version
DiagnosticSettingsVersion *int32
// List of log categories that are enabled
EnabledLogCategories []*string
// Name of the profile
Name *string
}
// NodePlacementConfiguration - Allocation configuration used by Batch Service to provision the nodes.
type NodePlacementConfiguration struct {
// Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy.
@ -1176,6 +1373,9 @@ type Pool struct {
// The properties associated with the pool.
Properties *PoolProperties
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
@ -1229,8 +1429,7 @@ type PoolProperties struct {
// instead.
Certificates []*CertificateReference
// Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration
// uses Azure Virtual Machines (IaaS).
// Deployment configuration properties.
DeploymentConfiguration *DeploymentConfiguration
// The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
@ -1278,16 +1477,11 @@ type PoolProperties struct {
// The list of user accounts to be created on each node in the pool.
UserAccounts []*UserAccount
// For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration),
// see Sizes for Cloud Services
// (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM
// sizes except ExtraSmall. For information about available VM sizes for pools using
// images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines
// (Linux)
// (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows)
// (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes
// except STANDARDA0 and those with premium storage (STANDARDGS, STANDARDDS, and
// STANDARDDSV2 series).
// For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/)
// or Sizes for Virtual Machines
// (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure
// VM sizes except STANDARDA0 and those with premium storage (STANDARDGS, STANDARD
// DS, and STANDARDDSV2 series).
VMSize *string
// READ-ONLY; Whether the pool is resizing.
@ -1337,6 +1531,9 @@ type PrivateEndpointConnection struct {
// The properties associated with the private endpoint connection.
Properties *PrivateEndpointConnectionProperties
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
@ -1370,6 +1567,9 @@ type PrivateLinkResource struct {
// The properties associated with the private link resource.
Properties *PrivateLinkResourceProperties
// The tags of the resource.
Tags map[string]*string
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
@ -1407,18 +1607,51 @@ type PrivateLinkServiceConnectionState struct {
ActionRequired *string
}
// ProxyResource - A definition of an Azure resource.
type ProxyResource struct {
// READ-ONLY; The ETag of the resource, used for concurrency statements.
Etag *string
// READ-ONLY; The ID of the resource.
ID *string
// READ-ONLY; The name of the resource.
// ProvisioningIssue - Describes a provisioning issue for a network security perimeter configuration
type ProvisioningIssue struct {
// READ-ONLY; Name of the issue
Name *string
// READ-ONLY; The type of the resource.
// READ-ONLY; Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should
// generate separate provisioning issue elements for each separate issue detected, and
// include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules
Properties *ProvisioningIssueProperties
}
// ProvisioningIssueProperties - Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource
// providers should generate separate provisioning issue elements for each separate issue detected, and
// include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules
type ProvisioningIssueProperties struct {
// READ-ONLY; Description of the issue
Description *string
// READ-ONLY; Type of issue
IssueType *IssueType
// READ-ONLY; Severity of the issue.
Severity *Severity
// READ-ONLY; Access rules that can be added to the network security profile (NSP) to remediate the issue.
SuggestedAccessRules []*AccessRule
// READ-ONLY; Fully qualified resource IDs of suggested resources that can be associated to the network security perimeter
// (NSP) to remediate the issue.
SuggestedResourceIDs []*string
}
// ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a
// location
type ProxyResource struct {
// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
@ -1469,24 +1702,30 @@ type ResizeOperationStatus struct {
TargetLowPriorityNodes *int32
}
// Resource - A definition of an Azure resource.
// Resource - Common fields that are returned in the response for all Azure Resource Manager resources
type Resource struct {
// READ-ONLY; The ID of the resource.
// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
ID *string
// READ-ONLY; The location of the resource.
Location *string
// READ-ONLY; The name of the resource.
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; The tags of the resource.
Tags map[string]*string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource.
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
// ResourceAssociation - Information about resource association
type ResourceAssociation struct {
// Access mode of the resource association
AccessMode *ResourceAssociationAccessMode
// Name of the resource association
Name *string
}
// ResourceFile - A single file or multiple files to be downloaded to a compute node.
type ResourceFile struct {
// The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be
@ -1598,7 +1837,7 @@ type SecurityProfile struct {
EncryptionAtHost *bool
// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.
SecurityType *string
SecurityType *SecurityTypes
// Specifies the security settings like secure boot and vTPM used while creating the virtual machine.
UefiSettings *UefiSettings
@ -1679,12 +1918,38 @@ type SupportedSKUsResult struct {
NextLink *string
}
// SystemData - Metadata pertaining to creation and last modification of the resource.
type SystemData struct {
// The timestamp of resource creation (UTC).
CreatedAt *time.Time
// The identity that created the resource.
CreatedBy *string
// The type of identity that created the resource.
CreatedByType *CreatedByType
// The timestamp of resource last modification (UTC)
LastModifiedAt *time.Time
// The identity that last modified the resource.
LastModifiedBy *string
// The type of identity that last modified the resource.
LastModifiedByType *CreatedByType
}
// TaskContainerSettings - The container settings for a task.
type TaskContainerSettings struct {
// REQUIRED; This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the
// image name, the tag ":latest" is used as a default.
ImageName *string
// If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZBATCHNODEROOTDIR
// in Linux). It won't' mount any data paths into container if this array
// is set as empty.
ContainerHostBatchBindMounts []*ContainerHostBatchBindMountEntry
// These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the
// Batch Service.
ContainerRunOptions *string
@ -1724,7 +1989,7 @@ type UpgradePolicy struct {
// The configuration parameters used for performing automatic OS upgrade.
AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy
// This property is only supported on Pools with the virtualMachineConfiguration property.
// The configuration parameters used while performing a rolling upgrade.
RollingUpgradePolicy *RollingUpgradePolicy
}
@ -1767,6 +2032,15 @@ type UserIdentity struct {
UserName *string
}
// VMDiskSecurityProfile - Specifies the security profile settings for the managed disk. Note: It can only be set for Confidential
// VMs and is required when using Confidential VMs.
type VMDiskSecurityProfile struct {
// Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption of just the VMGuestState
// blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState
// blob. Note: It can be set for only Confidential VMs and required when using Confidential VMs.
SecurityEncryptionType *SecurityEncryptionTypes
}
// VMExtension - The configuration for virtual machine extensions.
type VMExtension struct {
// REQUIRED; The name of the virtual machine extension.
@ -1868,7 +2142,6 @@ type WindowsConfiguration struct {
// WindowsUserConfiguration - Properties used to create a user account on a Windows node.
type WindowsUserConfiguration struct {
// Specifies login mode for the user. The default value for VirtualMachineConfiguration pools is interactive mode and for
// CloudServiceConfiguration pools is batch mode.
// Specifies login mode for the user. The default value is Interactive.
LoginMode *LoginMode
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -0,0 +1,261 @@
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package armbatch
import (
"context"
"errors"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"net/http"
"net/url"
"strings"
)
// NetworkSecurityPerimeterClient contains the methods for the NetworkSecurityPerimeter group.
// Don't use this type directly, use NewNetworkSecurityPerimeterClient() instead.
type NetworkSecurityPerimeterClient struct {
internal *arm.Client
subscriptionID string
}
// NewNetworkSecurityPerimeterClient creates a new instance of NetworkSecurityPerimeterClient with the specified values.
// - subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
// - credential - used to authorize requests. Usually a credential from azidentity.
// - options - pass nil to accept the default values.
func NewNetworkSecurityPerimeterClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterClient, error) {
cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
if err != nil {
return nil, err
}
client := &NetworkSecurityPerimeterClient{
subscriptionID: subscriptionID,
internal: cl,
}
return client, nil
}
// GetConfiguration - Gets information about the specified NSP configuration.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-07-01
// - resourceGroupName - The name of the resource group that contains the Batch account.
// - accountName - The name of the Batch account.
// - networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration
// - options - NetworkSecurityPerimeterClientGetConfigurationOptions contains the optional parameters for the NetworkSecurityPerimeterClient.GetConfiguration
// method.
func (client *NetworkSecurityPerimeterClient) GetConfiguration(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterClientGetConfigurationOptions) (NetworkSecurityPerimeterClientGetConfigurationResponse, error) {
var err error
const operationName = "NetworkSecurityPerimeterClient.GetConfiguration"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getConfigurationCreateRequest(ctx, resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, options)
if err != nil {
return NetworkSecurityPerimeterClientGetConfigurationResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return NetworkSecurityPerimeterClientGetConfigurationResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
return NetworkSecurityPerimeterClientGetConfigurationResponse{}, err
}
resp, err := client.getConfigurationHandleResponse(httpResp)
return resp, err
}
// getConfigurationCreateRequest creates the GetConfiguration request.
func (client *NetworkSecurityPerimeterClient) getConfigurationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterClientGetConfigurationOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
if resourceGroupName == "" {
return nil, errors.New("parameter resourceGroupName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
if accountName == "" {
return nil, errors.New("parameter accountName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName))
if networkSecurityPerimeterConfigurationName == "" {
return nil, errors.New("parameter networkSecurityPerimeterConfigurationName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{networkSecurityPerimeterConfigurationName}", url.PathEscape(networkSecurityPerimeterConfigurationName))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getConfigurationHandleResponse handles the GetConfiguration response.
func (client *NetworkSecurityPerimeterClient) getConfigurationHandleResponse(resp *http.Response) (NetworkSecurityPerimeterClientGetConfigurationResponse, error) {
result := NetworkSecurityPerimeterClientGetConfigurationResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSecurityPerimeterConfiguration); err != nil {
return NetworkSecurityPerimeterClientGetConfigurationResponse{}, err
}
return result, nil
}
// NewListConfigurationsPager - Lists all of the NSP configurations in the specified account.
//
// Generated from API version 2024-07-01
// - resourceGroupName - The name of the resource group that contains the Batch account.
// - accountName - The name of the Batch account.
// - options - NetworkSecurityPerimeterClientListConfigurationsOptions contains the optional parameters for the NetworkSecurityPerimeterClient.NewListConfigurationsPager
// method.
func (client *NetworkSecurityPerimeterClient) NewListConfigurationsPager(resourceGroupName string, accountName string, options *NetworkSecurityPerimeterClientListConfigurationsOptions) *runtime.Pager[NetworkSecurityPerimeterClientListConfigurationsResponse] {
return runtime.NewPager(runtime.PagingHandler[NetworkSecurityPerimeterClientListConfigurationsResponse]{
More: func(page NetworkSecurityPerimeterClientListConfigurationsResponse) bool {
return page.NextLink != nil && len(*page.NextLink) > 0
},
Fetcher: func(ctx context.Context, page *NetworkSecurityPerimeterClientListConfigurationsResponse) (NetworkSecurityPerimeterClientListConfigurationsResponse, error) {
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NetworkSecurityPerimeterClient.NewListConfigurationsPager")
nextLink := ""
if page != nil {
nextLink = *page.NextLink
}
resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
return client.listConfigurationsCreateRequest(ctx, resourceGroupName, accountName, options)
}, nil)
if err != nil {
return NetworkSecurityPerimeterClientListConfigurationsResponse{}, err
}
return client.listConfigurationsHandleResponse(resp)
},
Tracer: client.internal.Tracer(),
})
}
// listConfigurationsCreateRequest creates the ListConfigurations request.
func (client *NetworkSecurityPerimeterClient) listConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *NetworkSecurityPerimeterClientListConfigurationsOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
if resourceGroupName == "" {
return nil, errors.New("parameter resourceGroupName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
if accountName == "" {
return nil, errors.New("parameter accountName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName))
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// listConfigurationsHandleResponse handles the ListConfigurations response.
func (client *NetworkSecurityPerimeterClient) listConfigurationsHandleResponse(resp *http.Response) (NetworkSecurityPerimeterClientListConfigurationsResponse, error) {
result := NetworkSecurityPerimeterClientListConfigurationsResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSecurityPerimeterConfigurationListResult); err != nil {
return NetworkSecurityPerimeterClientListConfigurationsResponse{}, err
}
return result, nil
}
// BeginReconcileConfiguration - Reconciles the specified NSP configuration.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-07-01
// - resourceGroupName - The name of the resource group that contains the Batch account.
// - accountName - The name of the Batch account.
// - networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration
// - options - NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions contains the optional parameters for the NetworkSecurityPerimeterClient.BeginReconcileConfiguration
// method.
func (client *NetworkSecurityPerimeterClient) BeginReconcileConfiguration(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions) (*runtime.Poller[NetworkSecurityPerimeterClientReconcileConfigurationResponse], error) {
if options == nil || options.ResumeToken == "" {
resp, err := client.reconcileConfiguration(ctx, resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, options)
if err != nil {
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NetworkSecurityPerimeterClientReconcileConfigurationResponse]{
FinalStateVia: runtime.FinalStateViaLocation,
Tracer: client.internal.Tracer(),
})
return poller, err
} else {
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NetworkSecurityPerimeterClientReconcileConfigurationResponse]{
Tracer: client.internal.Tracer(),
})
}
}
// ReconcileConfiguration - Reconciles the specified NSP configuration.
// If the operation fails it returns an *azcore.ResponseError type.
//
// Generated from API version 2024-07-01
func (client *NetworkSecurityPerimeterClient) reconcileConfiguration(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions) (*http.Response, error) {
var err error
const operationName = "NetworkSecurityPerimeterClient.BeginReconcileConfiguration"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.reconcileConfigurationCreateRequest(ctx, resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, options)
if err != nil {
return nil, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
return nil, err
}
if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
err = runtime.NewResponseError(httpResp)
return nil, err
}
return httpResp, nil
}
// reconcileConfigurationCreateRequest creates the ReconcileConfiguration request.
func (client *NetworkSecurityPerimeterClient) reconcileConfigurationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
if resourceGroupName == "" {
return nil, errors.New("parameter resourceGroupName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
if accountName == "" {
return nil, errors.New("parameter accountName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName))
if networkSecurityPerimeterConfigurationName == "" {
return nil, errors.New("parameter networkSecurityPerimeterConfigurationName cannot be empty")
}
urlPath = strings.ReplaceAll(urlPath, "{networkSecurityPerimeterConfigurationName}", url.PathEscape(networkSecurityPerimeterConfigurationName))
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}

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

@ -0,0 +1,219 @@
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// DO NOT EDIT.
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationsList.json
func ExampleNetworkSecurityPerimeterClient_NewListConfigurationsPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNetworkSecurityPerimeterClient().NewListConfigurationsPager("default-azurebatch-japaneast", "sampleacct", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.NetworkSecurityPerimeterConfigurationListResult = armbatch.NetworkSecurityPerimeterConfigurationListResult{
// Value: []*armbatch.NetworkSecurityPerimeterConfiguration{
// {
// Name: to.Ptr("00000000-0000-0000-0000-000000000000.sampleassociation"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/networkSecurityPerimeterConfigurations"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/networkSecurityPerimeterConfigurations/00000000-0000-0000-0000-000000000000.sampleassociation"),
// Properties: &armbatch.NetworkSecurityPerimeterConfigurationProperties{
// NetworkSecurityPerimeter: &armbatch.NetworkSecurityPerimeter{
// ID: to.Ptr("/subscriptions/perimeterSubscriptionId/resourceGroups/perimeterResourceGroupName/providers/Microsoft.Network/networkSecurityPerimeters/perimeterName"),
// Location: to.Ptr("perimeterLocation"),
// PerimeterGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// },
// Profile: &armbatch.NetworkSecurityProfile{
// Name: to.Ptr("profileName"),
// AccessRules: []*armbatch.AccessRule{
// {
// Name: to.Ptr("accessRule1"),
// Properties: &armbatch.AccessRuleProperties{
// AddressPrefixes: []*string{
// to.Ptr("10.11.0.0/16"),
// to.Ptr("10.10.1.0/24")},
// Direction: to.Ptr(armbatch.AccessRuleDirectionInbound),
// EmailAddresses: []*string{
// },
// FullyQualifiedDomainNames: []*string{
// },
// NetworkSecurityPerimeters: []*armbatch.NetworkSecurityPerimeter{
// },
// PhoneNumbers: []*string{
// },
// Subscriptions: []*armbatch.AccessRulePropertiesSubscriptionsItem{
// },
// },
// },
// {
// Name: to.Ptr("accessRule2"),
// Properties: &armbatch.AccessRuleProperties{
// AddressPrefixes: []*string{
// },
// Direction: to.Ptr(armbatch.AccessRuleDirectionOutbound),
// EmailAddresses: []*string{
// },
// FullyQualifiedDomainNames: []*string{
// to.Ptr("paasrp1.contoso.org"),
// to.Ptr("paasrp2.contoso.org")},
// NetworkSecurityPerimeters: []*armbatch.NetworkSecurityPerimeter{
// },
// PhoneNumbers: []*string{
// },
// Subscriptions: []*armbatch.AccessRulePropertiesSubscriptionsItem{
// },
// },
// }},
// AccessRulesVersion: to.Ptr[int32](1),
// DiagnosticSettingsVersion: to.Ptr[int32](1),
// EnabledLogCategories: []*string{
// to.Ptr("logCategory1"),
// to.Ptr("logCategory2")},
// },
// ProvisioningIssues: []*armbatch.ProvisioningIssue{
// },
// ProvisioningState: to.Ptr(armbatch.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded),
// ResourceAssociation: &armbatch.ResourceAssociation{
// Name: to.Ptr("sampleassociation"),
// AccessMode: to.Ptr(armbatch.ResourceAssociationAccessModeLearning),
// },
// },
// }},
// }
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationGet.json
func ExampleNetworkSecurityPerimeterClient_GetConfiguration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNetworkSecurityPerimeterClient().GetConfiguration(ctx, "default-azurebatch-japaneast", "sampleacct", "00000000-0000-0000-0000-000000000000.sampleassociation", 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.NetworkSecurityPerimeterConfiguration = armbatch.NetworkSecurityPerimeterConfiguration{
// Name: to.Ptr("00000000-0000-0000-0000-000000000000.sampleassociation"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/networkSecurityPerimeterConfigurations"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/networkSecurityPerimeterConfigurations/00000000-0000-0000-0000-000000000000.sampleassociation"),
// Properties: &armbatch.NetworkSecurityPerimeterConfigurationProperties{
// NetworkSecurityPerimeter: &armbatch.NetworkSecurityPerimeter{
// ID: to.Ptr("/subscriptions/perimeterSubscriptionId/resourceGroups/perimeterResourceGroupName/providers/Microsoft.Network/networkSecurityPerimeters/perimeterName"),
// Location: to.Ptr("perimeterLocation"),
// PerimeterGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// },
// Profile: &armbatch.NetworkSecurityProfile{
// Name: to.Ptr("profileName"),
// AccessRules: []*armbatch.AccessRule{
// {
// Name: to.Ptr("accessRule1"),
// Properties: &armbatch.AccessRuleProperties{
// AddressPrefixes: []*string{
// to.Ptr("10.11.0.0/16"),
// to.Ptr("10.10.1.0/24")},
// Direction: to.Ptr(armbatch.AccessRuleDirectionInbound),
// EmailAddresses: []*string{
// },
// FullyQualifiedDomainNames: []*string{
// },
// NetworkSecurityPerimeters: []*armbatch.NetworkSecurityPerimeter{
// },
// PhoneNumbers: []*string{
// },
// Subscriptions: []*armbatch.AccessRulePropertiesSubscriptionsItem{
// },
// },
// },
// {
// Name: to.Ptr("accessRule2"),
// Properties: &armbatch.AccessRuleProperties{
// AddressPrefixes: []*string{
// },
// Direction: to.Ptr(armbatch.AccessRuleDirectionOutbound),
// EmailAddresses: []*string{
// },
// FullyQualifiedDomainNames: []*string{
// to.Ptr("paasrp1.contoso.org"),
// to.Ptr("paasrp2.contoso.org")},
// NetworkSecurityPerimeters: []*armbatch.NetworkSecurityPerimeter{
// },
// PhoneNumbers: []*string{
// },
// Subscriptions: []*armbatch.AccessRulePropertiesSubscriptionsItem{
// },
// },
// }},
// AccessRulesVersion: to.Ptr[int32](1),
// DiagnosticSettingsVersion: to.Ptr[int32](1),
// EnabledLogCategories: []*string{
// to.Ptr("logCategory1"),
// to.Ptr("logCategory2")},
// },
// ProvisioningIssues: []*armbatch.ProvisioningIssue{
// },
// ProvisioningState: to.Ptr(armbatch.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded),
// ResourceAssociation: &armbatch.ResourceAssociation{
// Name: to.Ptr("sampleassociation"),
// AccessMode: to.Ptr(armbatch.ResourceAssociationAccessModeLearning),
// },
// },
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationReconcile.json
func ExampleNetworkSecurityPerimeterClient_BeginReconcileConfiguration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNetworkSecurityPerimeterClient().BeginReconcileConfiguration(ctx, "default-azurebatch-japaneast", "sampleacct", "00000000-0000-0000-0000-000000000000.sampleassociation", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

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

@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil

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

@ -14,10 +14,10 @@ import (
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/OperationsList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/OperationsList.json
func ExampleOperationsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -188,16 +188,6 @@ type LocationClientGetQuotasOptions struct {
// placeholder for future optional parameters
}
// LocationClientListSupportedCloudServiceSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedCloudServiceSKUsPager
// method.
type LocationClientListSupportedCloudServiceSKUsOptions struct {
// OData filter expression. Valid properties for filtering are "familyName".
Filter *string
// The maximum number of items to return in the response.
Maxresults *int32
}
// LocationClientListSupportedVirtualMachineSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedVirtualMachineSKUsPager
// method.
type LocationClientListSupportedVirtualMachineSKUsOptions struct {
@ -208,6 +198,25 @@ type LocationClientListSupportedVirtualMachineSKUsOptions struct {
Maxresults *int32
}
// NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions contains the optional parameters for the NetworkSecurityPerimeterClient.BeginReconcileConfiguration
// method.
type NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions struct {
// Resumes the LRO from the provided token.
ResumeToken string
}
// NetworkSecurityPerimeterClientGetConfigurationOptions contains the optional parameters for the NetworkSecurityPerimeterClient.GetConfiguration
// method.
type NetworkSecurityPerimeterClientGetConfigurationOptions struct {
// placeholder for future optional parameters
}
// NetworkSecurityPerimeterClientListConfigurationsOptions contains the optional parameters for the NetworkSecurityPerimeterClient.NewListConfigurationsPager
// method.
type NetworkSecurityPerimeterClientListConfigurationsOptions struct {
// placeholder for future optional parameters
}
// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListOptions struct {
// placeholder for future optional parameters

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

@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {
@ -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 2024-02-01
// Generated from API version 2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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
@ -407,7 +407,7 @@ func (client *PoolClient) listByBatchAccountCreateRequest(ctx context.Context, r
if options != nil && options.Select != nil {
reqQP.Set("$select", *options.Select)
}
reqQP.Set("api-version", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
if options != nil && options.Maxresults != nil {
reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10))
}
@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {

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

@ -15,10 +15,10 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolList.json
func ExamplePoolClient_NewListByBatchAccountPager_listPool() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -73,9 +73,14 @@ func ExamplePoolClient_NewListByBatchAccountPager_listPool() {
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
// OSFamily: to.Ptr("4"),
// OSVersion: to.Ptr("WA-GUEST-OS-4.45_201708-01"),
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateEnabled),
@ -180,7 +185,7 @@ func ExamplePoolClient_NewListByBatchAccountPager_listPool() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolListWithFilter.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolListWithFilter.json
func ExamplePoolClient_NewListByBatchAccountPager_listPoolWithFilter() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -235,7 +240,7 @@ func ExamplePoolClient_NewListByBatchAccountPager_listPoolWithFilter() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_SharedImageGallery.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_SharedImageGallery.json
func ExamplePoolClient_Create_createPoolCustomImage() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -305,221 +310,7 @@ func ExamplePoolClient_Create_createPoolCustomImage() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_CloudServiceConfiguration.json
func ExamplePoolClient_Create_createPoolFullCloudServiceConfiguration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", 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{
ApplicationLicenses: []*string{
to.Ptr("app-license0"),
to.Ptr("app-license1")},
ApplicationPackages: []*armbatch.ApplicationPackageReference{
{
ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"),
Version: to.Ptr("asdf"),
}},
Certificates: []*armbatch.CertificateReference{
{
ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567"),
StoreLocation: to.Ptr(armbatch.CertificateStoreLocationLocalMachine),
StoreName: to.Ptr("MY"),
Visibility: []*armbatch.CertificateVisibility{
to.Ptr(armbatch.CertificateVisibilityRemoteUser)},
}},
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
OSFamily: to.Ptr("4"),
OSVersion: to.Ptr("WA-GUEST-OS-4.45_201708-01"),
},
},
DisplayName: to.Ptr("my-pool-name"),
InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateEnabled),
Metadata: []*armbatch.MetadataItem{
{
Name: to.Ptr("metadata-1"),
Value: to.Ptr("value-1"),
},
{
Name: to.Ptr("metadata-2"),
Value: to.Ptr("value-2"),
}},
NetworkConfiguration: &armbatch.NetworkConfiguration{
PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
IPAddressIDs: []*string{
to.Ptr("/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"),
to.Ptr("/subscriptions/subid2/resourceGroups/rg24/providers/Microsoft.Network/publicIPAddresses/ip268")},
Provision: to.Ptr(armbatch.IPAddressProvisioningTypeUserManaged),
},
SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
ResizeTimeout: to.Ptr("PT8M"),
TargetDedicatedNodes: to.Ptr[int32](6),
TargetLowPriorityNodes: to.Ptr[int32](28),
},
},
StartTask: &armbatch.StartTask{
CommandLine: to.Ptr("cmd /c SET"),
EnvironmentSettings: []*armbatch.EnvironmentSetting{
{
Name: to.Ptr("MYSET"),
Value: to.Ptr("1234"),
}},
MaxTaskRetryCount: to.Ptr[int32](6),
ResourceFiles: []*armbatch.ResourceFile{
{
FileMode: to.Ptr("777"),
FilePath: to.Ptr("c:\\temp\\gohere"),
HTTPURL: to.Ptr("https://testaccount.blob.core.windows.net/example-blob-file"),
}},
UserIdentity: &armbatch.UserIdentity{
AutoUser: &armbatch.AutoUserSpecification{
ElevationLevel: to.Ptr(armbatch.ElevationLevelAdmin),
Scope: to.Ptr(armbatch.AutoUserScopePool),
},
},
WaitForSuccess: to.Ptr(true),
},
TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypePack),
},
TaskSlotsPerNode: to.Ptr[int32](13),
UserAccounts: []*armbatch.UserAccount{
{
Name: to.Ptr("username1"),
ElevationLevel: to.Ptr(armbatch.ElevationLevelAdmin),
LinuxUserConfiguration: &armbatch.LinuxUserConfiguration{
Gid: to.Ptr[int32](4567),
SSHPrivateKey: to.Ptr("sshprivatekeyvalue"),
UID: to.Ptr[int32](1234),
},
Password: to.Ptr("<ExamplePassword>"),
}},
VMSize: to.Ptr("STANDARD_D4"),
},
}, &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/\"0x8D4EDFEBFADF4AB\""),
// 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, "2017-08-28T10:22:55.940Z"); return t}()),
// ApplicationLicenses: []*string{
// to.Ptr("app-license0"),
// to.Ptr("app-license1")},
// ApplicationPackages: []*armbatch.ApplicationPackageReference{
// {
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"),
// Version: to.Ptr("asdf"),
// }},
// Certificates: []*armbatch.CertificateReference{
// {
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567"),
// StoreLocation: to.Ptr(armbatch.CertificateStoreLocationLocalMachine),
// StoreName: to.Ptr("MY"),
// Visibility: []*armbatch.CertificateVisibility{
// to.Ptr(armbatch.CertificateVisibilityRemoteUser)},
// }},
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
// OSFamily: to.Ptr("4"),
// OSVersion: to.Ptr("WA-GUEST-OS-4.45_201708-01"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateEnabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// Metadata: []*armbatch.MetadataItem{
// {
// Name: to.Ptr("metadata-1"),
// Value: to.Ptr("value-1"),
// },
// {
// Name: to.Ptr("metadata-2"),
// Value: to.Ptr("value-2"),
// }},
// NetworkConfiguration: &armbatch.NetworkConfiguration{
// PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
// IPAddressIDs: []*string{
// to.Ptr("/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"),
// to.Ptr("/subscriptions/subid2/resourceGroups/rg24/providers/Microsoft.Network/publicIPAddresses/ip268")},
// Provision: to.Ptr(armbatch.IPAddressProvisioningTypeUserManaged),
// },
// SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
// },
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
// ResizeTimeout: to.Ptr("PT8M"),
// TargetDedicatedNodes: to.Ptr[int32](6),
// TargetLowPriorityNodes: to.Ptr[int32](28),
// },
// },
// StartTask: &armbatch.StartTask{
// CommandLine: to.Ptr("cmd /c SET"),
// EnvironmentSettings: []*armbatch.EnvironmentSetting{
// {
// Name: to.Ptr("MYSET"),
// Value: to.Ptr("1234"),
// }},
// MaxTaskRetryCount: to.Ptr[int32](6),
// ResourceFiles: []*armbatch.ResourceFile{
// {
// FileMode: to.Ptr("777"),
// FilePath: to.Ptr("c:\\temp\\gohere"),
// HTTPURL: to.Ptr("https://testaccount.blob.core.windows.net/example-blob-file"),
// }},
// UserIdentity: &armbatch.UserIdentity{
// AutoUser: &armbatch.AutoUserSpecification{
// ElevationLevel: to.Ptr(armbatch.ElevationLevelAdmin),
// Scope: to.Ptr(armbatch.AutoUserScopePool),
// },
// },
// WaitForSuccess: to.Ptr(true),
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypePack),
// },
// TaskSlotsPerNode: to.Ptr[int32](13),
// UserAccounts: []*armbatch.UserAccount{
// {
// Name: to.Ptr("username1"),
// ElevationLevel: to.Ptr(armbatch.ElevationLevelAdmin),
// LinuxUserConfiguration: &armbatch.LinuxUserConfiguration{
// Gid: to.Ptr[int32](4567),
// UID: to.Ptr[int32](1234),
// },
// }},
// VMSize: to.Ptr("STANDARD_D4"),
// },
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_VirtualMachineConfiguration.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_VirtualMachineConfiguration.json
func ExamplePoolClient_Create_createPoolFullVirtualMachineConfiguration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -712,84 +503,7 @@ func ExamplePoolClient_Create_createPoolFullVirtualMachineConfiguration() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json
func ExamplePoolClient_Create_createPoolMinimalCloudServiceConfiguration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", 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{
CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
OSFamily: to.Ptr("5"),
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](3),
},
},
VMSize: to.Ptr("STANDARD_D4"),
},
}, &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/\"0x8D4EDFEBFADF4AB\""),
// 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, "2017-08-28T10:22:55.940Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
// OSFamily: to.Ptr("5"),
// OSVersion: to.Ptr("*"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); 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, "2017-08-28T10:22:55.940Z"); return t}()),
// TargetDedicatedNodes: to.Ptr[int32](3),
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// ResizeTimeout: to.Ptr("PT15M"),
// TargetDedicatedNodes: to.Ptr[int32](3),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4"),
// },
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json
func ExamplePoolClient_Create_createPoolMinimalVirtualMachineConfiguration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -871,7 +585,7 @@ func ExamplePoolClient_Create_createPoolMinimalVirtualMachineConfiguration() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_NoPublicIPAddresses.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_NoPublicIPAddresses.json
func ExamplePoolClient_Create_createPoolNoPublicIp() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -953,7 +667,7 @@ func ExamplePoolClient_Create_createPoolNoPublicIp() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_PublicIPs.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_PublicIPs.json
func ExamplePoolClient_Create_createPoolPublicIPs() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1039,7 +753,7 @@ func ExamplePoolClient_Create_createPoolPublicIPs() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_ResourceTags.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_ResourceTags.json
func ExamplePoolClient_Create_createPoolResourceTags() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1136,7 +850,7 @@ func ExamplePoolClient_Create_createPoolResourceTags() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_SecurityProfile.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_SecurityProfile.json
func ExamplePoolClient_Create_createPoolSecurityProfile() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1160,7 +874,7 @@ func ExamplePoolClient_Create_createPoolSecurityProfile() {
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
SecurityProfile: &armbatch.SecurityProfile{
EncryptionAtHost: to.Ptr(true),
SecurityType: to.Ptr("trustedLaunch"),
SecurityType: to.Ptr(armbatch.SecurityTypesTrustedLaunch),
UefiSettings: &armbatch.UefiSettings{
VTpmEnabled: to.Ptr(false),
},
@ -1206,7 +920,7 @@ func ExamplePoolClient_Create_createPoolSecurityProfile() {
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// SecurityProfile: &armbatch.SecurityProfile{
// EncryptionAtHost: to.Ptr(true),
// SecurityType: to.Ptr("trustedLaunch"),
// SecurityType: to.Ptr(armbatch.SecurityTypesTrustedLaunch),
// UefiSettings: &armbatch.UefiSettings{
// VTpmEnabled: to.Ptr(false),
// },
@ -1239,7 +953,104 @@ func ExamplePoolClient_Create_createPoolSecurityProfile() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_UpgradePolicy.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_Tags.json
func ExamplePoolClient_Create_createPoolTags() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", 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{
Tags: map[string]*string{
"TagName1": to.Ptr("TagValue1"),
"TagName2": to.Ptr("TagValue2"),
},
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("0001-com-ubuntu-server-jammy"),
Publisher: to.Ptr("Canonical"),
SKU: to.Ptr("22_04-lts"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 22.04"),
},
},
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"),
// Tags: map[string]*string{
// "TagName1": to.Ptr("TagValue1"),
// "TagName2": to.Ptr("TagValue2"),
// },
// 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("0001-com-ubuntu-server-jammy"),
// Publisher: to.Ptr("Canonical"),
// SKU: to.Ptr("22_04-lts"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 22.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),
// },
// 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_UpgradePolicy.json
func ExamplePoolClient_Create_createPoolUpgradePolicy() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1376,7 +1187,7 @@ func ExamplePoolClient_Create_createPoolUpgradePolicy() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_UserAssignedIdentities.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_UserAssignedIdentities.json
func ExamplePoolClient_Create_createPoolUserAssignedIdentities() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1478,7 +1289,7 @@ func ExamplePoolClient_Create_createPoolUserAssignedIdentities() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json
func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationExtensions() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1586,7 +1397,7 @@ func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationExtensions()
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationOsDisk() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1690,7 +1501,7 @@ func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationOsDisk() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationServiceArtifactReference() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1803,7 +1614,7 @@ func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationServiceArtifa
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_AcceleratedNetworking.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_AcceleratedNetworking.json
func ExamplePoolClient_Create_createPoolAcceleratedNetworking() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1902,7 +1713,7 @@ func ExamplePoolClient_Create_createPoolAcceleratedNetworking() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolUpdate_EnableAutoScale.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_EnableAutoScale.json
func ExamplePoolClient_Update_updatePoolEnableAutoscale() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -1944,9 +1755,14 @@ func ExamplePoolClient_Update_updatePoolEnableAutoscale() {
// CurrentDedicatedNodes: to.Ptr[int32](12),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
// OSFamily: to.Ptr("5"),
// OSVersion: to.Ptr("*"),
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
@ -1974,7 +1790,7 @@ func ExamplePoolClient_Update_updatePoolEnableAutoscale() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolUpdate_OtherProperties.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_OtherProperties.json
func ExamplePoolClient_Update_updatePoolOtherProperties() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2049,9 +1865,14 @@ func ExamplePoolClient_Update_updatePoolOtherProperties() {
// CurrentDedicatedNodes: to.Ptr[int32](12),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
// OSFamily: to.Ptr("5"),
// OSVersion: to.Ptr("*"),
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
@ -2087,7 +1908,7 @@ func ExamplePoolClient_Update_updatePoolOtherProperties() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolUpdate_RemoveStartTask.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_RemoveStartTask.json
func ExamplePoolClient_Update_updatePoolRemoveStartTask() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2125,9 +1946,14 @@ func ExamplePoolClient_Update_updatePoolRemoveStartTask() {
// CurrentDedicatedNodes: to.Ptr[int32](12),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
// OSFamily: to.Ptr("5"),
// OSVersion: to.Ptr("*"),
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
@ -2155,7 +1981,7 @@ func ExamplePoolClient_Update_updatePoolRemoveStartTask() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolUpdate_ResizePool.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_ResizePool.json
func ExamplePoolClient_Update_updatePoolResizePool() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2200,9 +2026,14 @@ func ExamplePoolClient_Update_updatePoolResizePool() {
// CurrentDedicatedNodes: to.Ptr[int32](12),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
// OSFamily: to.Ptr("5"),
// OSVersion: to.Ptr("*"),
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
@ -2232,7 +2063,7 @@ func ExamplePoolClient_Update_updatePoolResizePool() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolDelete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolDelete.json
func ExamplePoolClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2253,7 +2084,7 @@ func ExamplePoolClient_BeginDelete() {
}
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet.json
func ExamplePoolClient_Get_getPool() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2299,9 +2130,14 @@ func ExamplePoolClient_Get_getPool() {
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// CloudServiceConfiguration: &armbatch.CloudServiceConfiguration{
// OSFamily: to.Ptr("4"),
// OSVersion: to.Ptr("WA-GUEST-OS-4.45_201708-01"),
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateEnabled),
@ -2400,7 +2236,7 @@ func ExamplePoolClient_Get_getPool() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_AcceleratedNetworking.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_AcceleratedNetworking.json
func ExamplePoolClient_Get_getPoolAcceleratedNetworking() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2471,7 +2307,7 @@ func ExamplePoolClient_Get_getPoolAcceleratedNetworking() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_SecurityProfile.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_SecurityProfile.json
func ExamplePoolClient_Get_getPoolSecurityProfile() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2512,7 +2348,7 @@ func ExamplePoolClient_Get_getPoolSecurityProfile() {
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// SecurityProfile: &armbatch.SecurityProfile{
// EncryptionAtHost: to.Ptr(true),
// SecurityType: to.Ptr("trustedLaunch"),
// SecurityType: to.Ptr(armbatch.SecurityTypesTrustedLaunch),
// UefiSettings: &armbatch.UefiSettings{
// VTpmEnabled: to.Ptr(false),
// },
@ -2545,7 +2381,7 @@ func ExamplePoolClient_Get_getPoolSecurityProfile() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_UpgradePolicy.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_UpgradePolicy.json
func ExamplePoolClient_Get_getPoolUpgradePolicy() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2636,7 +2472,7 @@ func ExamplePoolClient_Get_getPoolUpgradePolicy() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json
func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationExtensions() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2717,7 +2553,7 @@ func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationExtensions() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_VirtualMachineConfiguration_MangedOSDisk.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_VirtualMachineConfiguration_MangedOSDisk.json
func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationOsDisk() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2792,7 +2628,7 @@ func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationOsDisk() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json
func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationServiceArtifactReference() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2871,7 +2707,7 @@ func ExamplePoolClient_Get_getPoolVirtualMachineConfigurationServiceArtifactRefe
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolDisableAutoScale.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolDisableAutoScale.json
func ExamplePoolClient_DisableAutoScale() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
@ -2931,7 +2767,7 @@ func ExamplePoolClient_DisableAutoScale() {
// }
}
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolStopResize.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolStopResize.json
func ExamplePoolClient_StopResize() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -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 2024-02-01
// Generated from API version 2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.IfMatch != nil {

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

@ -15,10 +15,10 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateEndpointConnectionsList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateEndpointConnectionGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateEndpointConnectionUpdate.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateEndpointConnectionDelete.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionDelete.json
func ExamplePrivateEndpointConnectionClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-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 2024-02-01
// Generated from API version 2024-07-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", "2024-02-01")
reqQP.Set("api-version", "2024-07-01")
if options != nil && options.Maxresults != nil {
reqQP.Set("maxresults", strconv.FormatInt(int64(*options.Maxresults), 10))
}

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

@ -14,10 +14,10 @@ import (
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v2"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateLinkResourcesList.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateLinkResourceGet.json
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateLinkResourceGet.json
func ExamplePrivateLinkResourceClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {

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

@ -195,18 +195,29 @@ type LocationClientGetQuotasResponse struct {
LocationQuota
}
// LocationClientListSupportedCloudServiceSKUsResponse contains the response from method LocationClient.NewListSupportedCloudServiceSKUsPager.
type LocationClientListSupportedCloudServiceSKUsResponse struct {
// The Batch List supported SKUs operation response.
SupportedSKUsResult
}
// LocationClientListSupportedVirtualMachineSKUsResponse contains the response from method LocationClient.NewListSupportedVirtualMachineSKUsPager.
type LocationClientListSupportedVirtualMachineSKUsResponse struct {
// The Batch List supported SKUs operation response.
SupportedSKUsResult
}
// NetworkSecurityPerimeterClientGetConfigurationResponse contains the response from method NetworkSecurityPerimeterClient.GetConfiguration.
type NetworkSecurityPerimeterClientGetConfigurationResponse struct {
// Network security perimeter (NSP) configuration resource
NetworkSecurityPerimeterConfiguration
}
// NetworkSecurityPerimeterClientListConfigurationsResponse contains the response from method NetworkSecurityPerimeterClient.NewListConfigurationsPager.
type NetworkSecurityPerimeterClientListConfigurationsResponse struct {
// Result of a list NSP (network security perimeter) configurations request.
NetworkSecurityPerimeterConfigurationListResult
}
// NetworkSecurityPerimeterClientReconcileConfigurationResponse contains the response from method NetworkSecurityPerimeterClient.BeginReconcileConfiguration.
type NetworkSecurityPerimeterClientReconcileConfigurationResponse struct {
// placeholder for future response values
}
// OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type OperationsClientListResponse struct {
// Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next