armbatch

package module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 15 Imported by: 4

README

Azure Batch Module for Go

PkgGoDev

The armbatch module provides operations for working with Azure Batch.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Batch module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Batch. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Batch module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armbatch.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armbatch.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewAccountClient()

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Batch label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account added in v0.2.0

type Account struct {
	// The identity of the Batch account.
	Identity *AccountIdentity

	// The properties associated with the account.
	Properties *AccountProperties

	// 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
}

Account - Contains information about an Azure Batch account.

func (Account) MarshalJSON added in v0.2.0

func (a Account) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Account.

func (*Account) UnmarshalJSON added in v1.1.0

func (a *Account) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Account.

type AccountClient added in v0.2.0

type AccountClient struct {
	// contains filtered or unexported fields
}

AccountClient contains the methods for the BatchAccount group. Don't use this type directly, use NewAccountClient() instead.

func NewAccountClient added in v0.2.0

func NewAccountClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountClient, error)

NewAccountClient creates a new instance of AccountClient 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 (*AccountClient) BeginCreate added in v0.2.0

func (client *AccountClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters, options *AccountClientBeginCreateOptions) (*runtime.Poller[AccountClientCreateResponse], error)

BeginCreate - Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this 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 2022-10-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 used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.
  • parameters - Additional parameters for account creation.
  • options - AccountClientBeginCreateOptions contains the optional parameters for the AccountClient.BeginCreate method.
Example (BatchAccountCreateByos)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_BYOS.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
		Location: to.Ptr("japaneast"),
		Properties: &armbatch.AccountCreateProperties{
			AutoStorage: &armbatch.AutoStorageBaseProperties{
				StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
			},
			KeyVaultReference: &armbatch.KeyVaultReference{
				ID:  to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
				URL: to.Ptr("http://sample.vault.azure.net/"),
			},
			PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeUserSubscription),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Account = armbatch.Account{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
	// 	Location: to.Ptr("japaneast"),
	// 	Identity: &armbatch.AccountIdentity{
	// 		Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
	// 	},
	// 	Properties: &armbatch.AccountProperties{
	// 		AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
	// 		ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
	// 		AutoStorage: &armbatch.AutoStorageProperties{
	// 			StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
	// 			LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
	// 		},
	// 		DedicatedCoreQuota: to.Ptr[int32](20),
	// 		KeyVaultReference: &armbatch.KeyVaultReference{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
	// 			URL: to.Ptr("http://sample.vault.azure.net/"),
	// 		},
	// 		LowPriorityCoreQuota: to.Ptr[int32](20),
	// 		PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeUserSubscription),
	// 		PoolQuota: to.Ptr[int32](20),
	// 		ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
	// 	},
	// }
}
Output:

Example (BatchAccountCreateDefault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_Default.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
		Location: to.Ptr("japaneast"),
		Properties: &armbatch.AccountCreateProperties{
			AutoStorage: &armbatch.AutoStorageBaseProperties{
				StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Account = armbatch.Account{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
	// 	Location: to.Ptr("japaneast"),
	// 	Identity: &armbatch.AccountIdentity{
	// 		Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
	// 	},
	// 	Properties: &armbatch.AccountProperties{
	// 		AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
	// 		ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
	// 		AutoStorage: &armbatch.AutoStorageProperties{
	// 			StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
	// 			LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
	// 		},
	// 		DedicatedCoreQuota: to.Ptr[int32](20),
	// 		LowPriorityCoreQuota: to.Ptr[int32](20),
	// 		PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
	// 		PoolQuota: to.Ptr[int32](20),
	// 		ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
	// 	},
	// }
}
Output:

Example (BatchAccountCreateSystemAssignedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_SystemAssignedIdentity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
		Identity: &armbatch.AccountIdentity{
			Type: to.Ptr(armbatch.ResourceIdentityTypeSystemAssigned),
		},
		Location: to.Ptr("japaneast"),
		Properties: &armbatch.AccountCreateProperties{
			AutoStorage: &armbatch.AutoStorageBaseProperties{
				StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Account = armbatch.Account{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
	// 	Location: to.Ptr("japaneast"),
	// 	Identity: &armbatch.AccountIdentity{
	// 		Type: to.Ptr(armbatch.ResourceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("1a2e532b-9900-414c-8600-cfc6126628d7"),
	// 		TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
	// 	},
	// 	Properties: &armbatch.AccountProperties{
	// 		AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
	// 		ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
	// 		AutoStorage: &armbatch.AutoStorageProperties{
	// 			StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
	// 			LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
	// 		},
	// 		DedicatedCoreQuota: to.Ptr[int32](20),
	// 		LowPriorityCoreQuota: to.Ptr[int32](20),
	// 		PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
	// 		PoolQuota: to.Ptr[int32](20),
	// 		ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
	// 	},
	// }
}
Output:

Example (BatchAccountCreateUserAssignedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_UserAssignedIdentity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
		Identity: &armbatch.AccountIdentity{
			Type: to.Ptr(armbatch.ResourceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
				"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
			},
		},
		Location: to.Ptr("japaneast"),
		Properties: &armbatch.AccountCreateProperties{
			AutoStorage: &armbatch.AutoStorageBaseProperties{
				StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Account = armbatch.Account{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
	// 	Location: to.Ptr("japaneast"),
	// 	Identity: &armbatch.AccountIdentity{
	// 		Type: to.Ptr(armbatch.ResourceIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
	// 			"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armbatch.UserAssignedIdentities{
	// 				ClientID: to.Ptr("clientId1"),
	// 				PrincipalID: to.Ptr("principalId1"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armbatch.AccountProperties{
	// 		AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
	// 		ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
	// 		AutoStorage: &armbatch.AutoStorageProperties{
	// 			StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
	// 			LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
	// 		},
	// 		DedicatedCoreQuota: to.Ptr[int32](20),
	// 		LowPriorityCoreQuota: to.Ptr[int32](20),
	// 		PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
	// 		PoolQuota: to.Ptr[int32](20),
	// 		ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
	// 	},
	// }
}
Output:

Example (PrivateBatchAccountCreate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateBatchAccountCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
		Location: to.Ptr("japaneast"),
		Properties: &armbatch.AccountCreateProperties{
			AutoStorage: &armbatch.AutoStorageBaseProperties{
				StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
			},
			KeyVaultReference: &armbatch.KeyVaultReference{
				ID:  to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
				URL: to.Ptr("http://sample.vault.azure.net/"),
			},
			PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeDisabled),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Account = armbatch.Account{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
	// 	Location: to.Ptr("japaneast"),
	// 	Identity: &armbatch.AccountIdentity{
	// 		Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
	// 	},
	// 	Properties: &armbatch.AccountProperties{
	// 		AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
	// 		ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
	// 		AutoStorage: &armbatch.AutoStorageProperties{
	// 			StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
	// 			LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
	// 		},
	// 		DedicatedCoreQuota: to.Ptr[int32](20),
	// 		KeyVaultReference: &armbatch.KeyVaultReference{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
	// 			URL: to.Ptr("http://sample.vault.azure.net/"),
	// 		},
	// 		LowPriorityCoreQuota: to.Ptr[int32](20),
	// 		PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeUserSubscription),
	// 		PoolQuota: to.Ptr[int32](20),
	// 		ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeDisabled),
	// 	},
	// }
}
Output:

func (*AccountClient) BeginDelete added in v0.2.0

func (client *AccountClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, options *AccountClientBeginDeleteOptions) (*runtime.Poller[AccountClientDeleteResponse], error)

BeginDelete - Deletes the specified Batch account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().BeginDelete(ctx, "default-azurebatch-japaneast", "sampleacct", 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)
	}
}
Output:

func (*AccountClient) Get added in v0.2.0

func (client *AccountClient) Get(ctx context.Context, resourceGroupName string, accountName string, options *AccountClientGetOptions) (AccountClientGetResponse, error)

Get - Gets information about the specified Batch account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
Example (BatchAccountGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", 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.Account = armbatch.Account{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
	// 	Location: to.Ptr("japaneast"),
	// 	Identity: &armbatch.AccountIdentity{
	// 		Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
	// 	},
	// 	Properties: &armbatch.AccountProperties{
	// 		AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
	// 		ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
	// 		AutoStorage: &armbatch.AutoStorageProperties{
	// 			StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
	// 			LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
	// 		},
	// 		DedicatedCoreQuota: to.Ptr[int32](20),
	// 		LowPriorityCoreQuota: to.Ptr[int32](20),
	// 		PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
	// 		PoolQuota: to.Ptr[int32](20),
	// 		ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
	// 	},
	// }
}
Output:

Example (PrivateBatchAccountGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateBatchAccountGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", 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.Account = armbatch.Account{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
	// 	Location: to.Ptr("japaneast"),
	// 	Properties: &armbatch.AccountProperties{
	// 		AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
	// 		ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
	// 		AutoStorage: &armbatch.AutoStorageProperties{
	// 			StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
	// 			LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
	// 		},
	// 		DedicatedCoreQuota: to.Ptr[int32](20),
	// 		LowPriorityCoreQuota: to.Ptr[int32](20),
	// 		PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
	// 		PoolQuota: to.Ptr[int32](20),
	// 		PrivateEndpointConnections: []*armbatch.PrivateEndpointConnection{
	// 			{
	// 				Name: to.Ptr("testprivateEndpointConnection.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0"),
	// 				Type: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnections"),
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/privateEndpointConnections/testprivateEndpointConnection.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0"),
	// 				Properties: &armbatch.PrivateEndpointConnectionProperties{
	// 					PrivateEndpoint: &armbatch.PrivateEndpoint{
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Network/privateEndpoints/testprivateEndpoint"),
	// 					},
	// 					PrivateLinkServiceConnectionState: &armbatch.PrivateLinkServiceConnectionState{
	// 						Description: to.Ptr("Approved by xyz.abc@company.com"),
	// 						Status: to.Ptr(armbatch.PrivateLinkServiceConnectionStatusApproved),
	// 					},
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeDisabled),
	// 	},
	// }
}
Output:

func (*AccountClient) GetDetector added in v0.3.0

func (client *AccountClient) GetDetector(ctx context.Context, resourceGroupName string, accountName string, detectorID string, options *AccountClientGetDetectorOptions) (AccountClientGetDetectorResponse, error)

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 2022-10-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.
  • options - AccountClientGetDetectorOptions contains the optional parameters for the AccountClient.GetDetector method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/DetectorGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().GetDetector(ctx, "default-azurebatch-japaneast", "sampleacct", "poolsAndNodes", 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.DetectorResponse = armbatch.DetectorResponse{
	// 	Name: to.Ptr("poolsAndNodes"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/detectors"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/detectors/poolsAndNodes"),
	// 	Properties: &armbatch.DetectorResponseProperties{
	// 		Value: to.Ptr("ew0KICAibWV0YWRhdGEiOiB7DQogICAgImlkIjogInBvb2xzQW5kTm9kZXMiLA0KICAgICJuYW1lIjogIlBvb2xzIGFuZCBOb2RlcyIsDQogICAgImRlc2NyaXB0aW9uIjogbnVsbCwNCiAgICAiYXV0aG9yIjogIiIsDQogICAgImNhdGVnb3J5IjogbnVsbCwNCiAgICAic3VwcG9ydFRvcGljTGlzdCI6IFsNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDc3IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDYxIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDY1IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDY2IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDY5IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDcyIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDc5IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDgyIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDkxIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDkzIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDk0IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfQ0KICAgIF0sDQogICAgImFuYWx5c2lzVHlwZXMiOiBudWxsLA0KICAgICJ0eXBlIjogIkFuYWx5c2lzIiwNCiAgICAic2NvcmUiOiAwLjANCiAgfSwNCiAgImRhdGFzZXQiOiBbXSwNCiAgInN0YXR1cyI6IHsNCiAgICAibWVzc2FnZSI6IG51bGwsDQogICAgInN0YXR1c0lkIjogNA0KICB9LA0KICAiZGF0YVByb3ZpZGVyc01ldGFkYXRhIjogbnVsbCwNCiAgInN1Z2dlc3RlZFV0dGVyYW5jZXMiOiBudWxsDQp9"),
	// 	},
	// }
}
Output:

func (*AccountClient) GetKeys added in v0.2.0

func (client *AccountClient) GetKeys(ctx context.Context, resourceGroupName string, accountName string, options *AccountClientGetKeysOptions) (AccountClientGetKeysResponse, error)

GetKeys - This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountGetKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().GetKeys(ctx, "default-azurebatch-japaneast", "sampleacct", 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.AccountKeys = armbatch.AccountKeys{
	// 	AccountName: to.Ptr("sampleacct"),
	// 	Primary: to.Ptr("AAAA=="),
	// 	Secondary: to.Ptr("BBBB=="),
	// }
}
Output:

func (*AccountClient) NewListByResourceGroupPager added in v0.4.0

func (client *AccountClient) NewListByResourceGroupPager(resourceGroupName string, options *AccountClientListByResourceGroupOptions) *runtime.Pager[AccountClientListByResourceGroupResponse]

NewListByResourceGroupPager - Gets information about the Batch accounts associated with the specified resource group.

Generated from API version 2022-10-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • options - AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().NewListByResourceGroupPager("default-azurebatch-japaneast", 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.AccountListResult = armbatch.AccountListResult{
		// 	Value: []*armbatch.Account{
		// 		{
		// 			Name: to.Ptr("sampleacct"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
		// 			Location: to.Ptr("japaneast"),
		// 			Identity: &armbatch.AccountIdentity{
		// 				Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
		// 			},
		// 			Properties: &armbatch.AccountProperties{
		// 				AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
		// 				ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
		// 				AutoStorage: &armbatch.AutoStorageProperties{
		// 					StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
		// 					LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
		// 				},
		// 				DedicatedCoreQuota: to.Ptr[int32](20),
		// 				LowPriorityCoreQuota: to.Ptr[int32](20),
		// 				PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
		// 				PoolQuota: to.Ptr[int32](20),
		// 				ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
		// 				PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AccountClient) NewListDetectorsPager added in v0.4.0

func (client *AccountClient) NewListDetectorsPager(resourceGroupName string, accountName string, options *AccountClientListDetectorsOptions) *runtime.Pager[AccountClientListDetectorsResponse]

NewListDetectorsPager - Gets information about the detectors available for a given Batch account.

Generated from API version 2022-10-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 method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/DetectorList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().NewListDetectorsPager("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.DetectorListResult = armbatch.DetectorListResult{
		// 	Value: []*armbatch.DetectorResponse{
		// 		{
		// 			Name: to.Ptr("poolsAndNodes"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/detectors"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/detectors/poolsAndNodes"),
		// 			Properties: &armbatch.DetectorResponseProperties{
		// 				Value: to.Ptr("ew0KICAibWV0YWRhdGEiOiB7DQogICAgImlkIjogInBvb2xzQW5kTm9kZXMiLA0KICAgICJuYW1lIjogIlBvb2xzIGFuZCBOb2RlcyIsDQogICAgImRlc2NyaXB0aW9uIjogbnVsbCwNCiAgICAiYXV0aG9yIjogIiIsDQogICAgImNhdGVnb3J5IjogbnVsbCwNCiAgICAic3VwcG9ydFRvcGljTGlzdCI6IFsNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDc3IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDYxIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDY1IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDY2IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDY5IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDcyIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDc5IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDgyIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDkxIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDkzIiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfSwNCiAgICAgIHsNCiAgICAgICAgImlkIjogIjMyNjM1MDk0IiwNCiAgICAgICAgInBlc0lkIjogIjE1NjE0IiwNCiAgICAgICAgInR5cGVJZCI6ICJEaWFnbm9zdGljcy5Nb2RlbHNBbmRVdGlscy5BdHRyaWJ1dGVzLlN1cHBvcnRUb3BpYywgRGlhZ25vc3RpY3MuTW9kZWxzQW5kVXRpbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsIg0KICAgICAgfQ0KICAgIF0sDQogICAgImFuYWx5c2lzVHlwZXMiOiBudWxsLA0KICAgICJ0eXBlIjogIkFuYWx5c2lzIiwNCiAgICAic2NvcmUiOiAwLjANCiAgfSwNCiAgImRhdGFzZXQiOiBbXSwNCiAgInN0YXR1cyI6IHsNCiAgICAibWVzc2FnZSI6IG51bGwsDQogICAgInN0YXR1c0lkIjogNA0KICB9LA0KICAiZGF0YVByb3ZpZGVyc01ldGFkYXRhIjogbnVsbCwNCiAgInN1Z2dlc3RlZFV0dGVyYW5jZXMiOiBudWxsDQp9"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AccountClient) NewListOutboundNetworkDependenciesEndpointsPager added in v0.4.0

func (client *AccountClient) NewListOutboundNetworkDependenciesEndpointsPager(resourceGroupName string, accountName string, options *AccountClientListOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[AccountClientListOutboundNetworkDependenciesEndpointsResponse]

NewListOutboundNetworkDependenciesEndpointsPager - Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause 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 2022-10-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 method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().NewListOutboundNetworkDependenciesEndpointsPager("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.OutboundEnvironmentEndpointCollection = armbatch.OutboundEnvironmentEndpointCollection{
		// 	Value: []*armbatch.OutboundEnvironmentEndpoint{
		// 		{
		// 			Category: to.Ptr("Azure Batch"),
		// 			Endpoints: []*armbatch.EndpointDependency{
		// 				{
		// 					Description: to.Ptr("Applicable to job manager tasks, tasks that use job scoped authentication, or any task that makes calls to Batch."),
		// 					DomainName: to.Ptr("sampleacct.japaneast.batch.azure.com"),
		// 					EndpointDetails: []*armbatch.EndpointDetail{
		// 						{
		// 							Port: to.Ptr[int32](443),
		// 					}},
		// 				},
		// 				{
		// 					Description: to.Ptr("Applicable to all Azure Batch pools."),
		// 					DomainName: to.Ptr("japaneast.service.batch.azure.com"),
		// 					EndpointDetails: []*armbatch.EndpointDetail{
		// 						{
		// 							Port: to.Ptr[int32](443),
		// 					}},
		// 			}},
		// 		},
		// 		{
		// 			Category: to.Ptr("Azure Storage"),
		// 			Endpoints: []*armbatch.EndpointDependency{
		// 				{
		// 					Description: to.Ptr("AutoStorage endpoint for this Batch account. Applicable to all Azure Batch pools under this account."),
		// 					DomainName: to.Ptr("autostorageaccountname.blob.core.windows.net"),
		// 					EndpointDetails: []*armbatch.EndpointDetail{
		// 						{
		// 							Port: to.Ptr[int32](443),
		// 					}},
		// 				},
		// 				{
		// 					Description: to.Ptr("Applicable to all Azure Batch pools."),
		// 					DomainName: to.Ptr("*.blob.core.windows.net"),
		// 					EndpointDetails: []*armbatch.EndpointDetail{
		// 						{
		// 							Port: to.Ptr[int32](443),
		// 					}},
		// 				},
		// 				{
		// 					Description: to.Ptr("Applicable to all Azure Batch pools."),
		// 					DomainName: to.Ptr("*.table.core.windows.net"),
		// 					EndpointDetails: []*armbatch.EndpointDetail{
		// 						{
		// 							Port: to.Ptr[int32](443),
		// 					}},
		// 				},
		// 				{
		// 					Description: to.Ptr("Applicable to all Azure Batch pools."),
		// 					DomainName: to.Ptr("*.queue.core.windows.net"),
		// 					EndpointDetails: []*armbatch.EndpointDetail{
		// 						{
		// 							Port: to.Ptr[int32](443),
		// 					}},
		// 			}},
		// 		},
		// 		{
		// 			Category: to.Ptr("Microsoft Package Repository"),
		// 			Endpoints: []*armbatch.EndpointDependency{
		// 				{
		// 					Description: to.Ptr("Only applicable to pools containing a Mount Configuration. Learn about Mount Configurations in Batch at https://docs.microsoft.com/azure/batch/virtual-file-mount."),
		// 					DomainName: to.Ptr("packages.microsoft.com"),
		// 					EndpointDetails: []*armbatch.EndpointDetail{
		// 						{
		// 							Port: to.Ptr[int32](443),
		// 					}},
		// 			}},
		// 		},
		// 		{
		// 			Category: to.Ptr("Azure Key Vault"),
		// 			Endpoints: []*armbatch.EndpointDependency{
		// 				{
		// 					Description: to.Ptr("Only applicable to pools containing a Disk Encryption Configuration and whose VM size does not support encryption at host. Learn more about disk encryption in Azure Batch at https://docs.microsoft.com/azure/batch/disk-encryption. Learn more about encryption at host and supported VM sizes at https://docs.microsoft.com/azure/virtual-machines/disks-enable-host-based-encryption-portal."),
		// 					DomainName: to.Ptr("*.vault.azure.net"),
		// 					EndpointDetails: []*armbatch.EndpointDetail{
		// 						{
		// 							Port: to.Ptr[int32](443),
		// 					}},
		// 			}},
		// 	}},
		// }
	}
}
Output:

func (*AccountClient) NewListPager added in v0.4.0

NewListPager - Gets information about the Batch accounts associated with the subscription.

Generated from API version 2022-10-01

  • options - AccountClientListOptions contains the optional parameters for the AccountClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().NewListPager(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.AccountListResult = armbatch.AccountListResult{
		// 	Value: []*armbatch.Account{
		// 		{
		// 			Name: to.Ptr("sampleacct"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
		// 			Location: to.Ptr("japaneast"),
		// 			Identity: &armbatch.AccountIdentity{
		// 				Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
		// 			},
		// 			Properties: &armbatch.AccountProperties{
		// 				AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
		// 				ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
		// 				AutoStorage: &armbatch.AutoStorageProperties{
		// 					StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
		// 					LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
		// 				},
		// 				DedicatedCoreQuota: to.Ptr[int32](20),
		// 				LowPriorityCoreQuota: to.Ptr[int32](20),
		// 				PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
		// 				PoolQuota: to.Ptr[int32](20),
		// 				ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
		// 				PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AccountClient) RegenerateKey added in v0.2.0

func (client *AccountClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters AccountRegenerateKeyParameters, options *AccountClientRegenerateKeyOptions) (AccountClientRegenerateKeyResponse, error)

RegenerateKey - This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will fail. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - AccountClientRegenerateKeyOptions contains the optional parameters for the AccountClient.RegenerateKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().RegenerateKey(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountRegenerateKeyParameters{
		KeyName: to.Ptr(armbatch.AccountKeyTypePrimary),
	}, 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.AccountKeys = armbatch.AccountKeys{
	// 	AccountName: to.Ptr("sampleacct"),
	// 	Primary: to.Ptr("AAAA=="),
	// 	Secondary: to.Ptr("BBBB=="),
	// }
}
Output:

func (*AccountClient) SynchronizeAutoStorageKeys added in v0.2.0

func (client *AccountClient) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string, options *AccountClientSynchronizeAutoStorageKeysOptions) (AccountClientSynchronizeAutoStorageKeysResponse, error)

SynchronizeAutoStorageKeys - Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage key authentication is being used. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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 method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountSynchronizeAutoStorageKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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)
	}
	_, err = clientFactory.NewAccountClient().SynchronizeAutoStorageKeys(ctx, "default-azurebatch-japaneast", "sampleacct", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AccountClient) Update added in v0.2.0

func (client *AccountClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters, options *AccountClientUpdateOptions) (AccountClientUpdateResponse, error)

Update - Updates the properties of an existing Batch account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - AccountClientUpdateOptions contains the optional parameters for the AccountClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewAccountClient().Update(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountUpdateParameters{
		Properties: &armbatch.AccountUpdateProperties{
			AutoStorage: &armbatch.AutoStorageBaseProperties{
				StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
			},
		},
	}, 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.Account = armbatch.Account{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
	// 	Location: to.Ptr("japaneast"),
	// 	Identity: &armbatch.AccountIdentity{
	// 		Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
	// 	},
	// 	Properties: &armbatch.AccountProperties{
	// 		AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
	// 		ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
	// 		AutoStorage: &armbatch.AutoStorageProperties{
	// 			StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
	// 			LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
	// 		},
	// 		DedicatedCoreQuota: to.Ptr[int32](20),
	// 		LowPriorityCoreQuota: to.Ptr[int32](20),
	// 		PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
	// 		PoolQuota: to.Ptr[int32](20),
	// 		ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
	// 		PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
	// 	},
	// }
}
Output:

type AccountClientBeginCreateOptions added in v0.2.0

type AccountClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AccountClientBeginCreateOptions contains the optional parameters for the AccountClient.BeginCreate method.

type AccountClientBeginDeleteOptions added in v0.2.0

type AccountClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AccountClientBeginDeleteOptions contains the optional parameters for the AccountClient.BeginDelete method.

type AccountClientCreateResponse added in v0.2.0

type AccountClientCreateResponse struct {
	Account
}

AccountClientCreateResponse contains the response from method AccountClient.BeginCreate.

type AccountClientDeleteResponse added in v0.2.0

type AccountClientDeleteResponse struct {
}

AccountClientDeleteResponse contains the response from method AccountClient.BeginDelete.

type AccountClientGetDetectorOptions added in v0.3.0

type AccountClientGetDetectorOptions struct {
}

AccountClientGetDetectorOptions contains the optional parameters for the AccountClient.GetDetector method.

type AccountClientGetDetectorResponse added in v0.3.0

type AccountClientGetDetectorResponse struct {
	DetectorResponse
}

AccountClientGetDetectorResponse contains the response from method AccountClient.GetDetector.

type AccountClientGetKeysOptions added in v0.2.0

type AccountClientGetKeysOptions struct {
}

AccountClientGetKeysOptions contains the optional parameters for the AccountClient.GetKeys method.

type AccountClientGetKeysResponse added in v0.2.0

type AccountClientGetKeysResponse struct {
	AccountKeys
}

AccountClientGetKeysResponse contains the response from method AccountClient.GetKeys.

type AccountClientGetOptions added in v0.2.0

type AccountClientGetOptions struct {
}

AccountClientGetOptions contains the optional parameters for the AccountClient.Get method.

type AccountClientGetResponse added in v0.2.0

type AccountClientGetResponse struct {
	Account
}

AccountClientGetResponse contains the response from method AccountClient.Get.

type AccountClientListByResourceGroupOptions added in v0.2.0

type AccountClientListByResourceGroupOptions struct {
}

AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.NewListByResourceGroupPager method.

type AccountClientListByResourceGroupResponse added in v0.2.0

type AccountClientListByResourceGroupResponse struct {
	AccountListResult
}

AccountClientListByResourceGroupResponse contains the response from method AccountClient.NewListByResourceGroupPager.

type AccountClientListDetectorsOptions added in v0.3.0

type AccountClientListDetectorsOptions struct {
}

AccountClientListDetectorsOptions contains the optional parameters for the AccountClient.NewListDetectorsPager method.

type AccountClientListDetectorsResponse added in v0.3.0

type AccountClientListDetectorsResponse struct {
	DetectorListResult
}

AccountClientListDetectorsResponse contains the response from method AccountClient.NewListDetectorsPager.

type AccountClientListOptions added in v0.2.0

type AccountClientListOptions struct {
}

AccountClientListOptions contains the optional parameters for the AccountClient.NewListPager method.

type AccountClientListOutboundNetworkDependenciesEndpointsOptions added in v0.2.0

type AccountClientListOutboundNetworkDependenciesEndpointsOptions struct {
}

AccountClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the AccountClient.NewListOutboundNetworkDependenciesEndpointsPager method.

type AccountClientListOutboundNetworkDependenciesEndpointsResponse added in v0.2.0

type AccountClientListOutboundNetworkDependenciesEndpointsResponse struct {
	OutboundEnvironmentEndpointCollection
}

AccountClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method AccountClient.NewListOutboundNetworkDependenciesEndpointsPager.

type AccountClientListResponse added in v0.2.0

type AccountClientListResponse struct {
	AccountListResult
}

AccountClientListResponse contains the response from method AccountClient.NewListPager.

type AccountClientRegenerateKeyOptions added in v0.2.0

type AccountClientRegenerateKeyOptions struct {
}

AccountClientRegenerateKeyOptions contains the optional parameters for the AccountClient.RegenerateKey method.

type AccountClientRegenerateKeyResponse added in v0.2.0

type AccountClientRegenerateKeyResponse struct {
	AccountKeys
}

AccountClientRegenerateKeyResponse contains the response from method AccountClient.RegenerateKey.

type AccountClientSynchronizeAutoStorageKeysOptions added in v0.2.0

type AccountClientSynchronizeAutoStorageKeysOptions struct {
}

AccountClientSynchronizeAutoStorageKeysOptions contains the optional parameters for the AccountClient.SynchronizeAutoStorageKeys method.

type AccountClientSynchronizeAutoStorageKeysResponse added in v0.2.0

type AccountClientSynchronizeAutoStorageKeysResponse struct {
}

AccountClientSynchronizeAutoStorageKeysResponse contains the response from method AccountClient.SynchronizeAutoStorageKeys.

type AccountClientUpdateOptions added in v0.2.0

type AccountClientUpdateOptions struct {
}

AccountClientUpdateOptions contains the optional parameters for the AccountClient.Update method.

type AccountClientUpdateResponse added in v0.2.0

type AccountClientUpdateResponse struct {
	Account
}

AccountClientUpdateResponse contains the response from method AccountClient.Update.

type AccountCreateParameters added in v0.2.0

type AccountCreateParameters struct {
	// REQUIRED; The region in which to create the account.
	Location *string

	// The identity of the Batch account.
	Identity *AccountIdentity

	// The properties of the Batch account.
	Properties *AccountCreateProperties

	// The user-specified tags associated with the account.
	Tags map[string]*string
}

AccountCreateParameters - Parameters supplied to the Create operation.

func (AccountCreateParameters) MarshalJSON added in v0.2.0

func (a AccountCreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountCreateParameters.

func (*AccountCreateParameters) UnmarshalJSON added in v1.1.0

func (a *AccountCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountCreateParameters.

type AccountCreateProperties added in v0.2.0

type AccountCreateProperties struct {
	// List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does
	// not affect authentication with the control plane.
	AllowedAuthenticationModes []*AuthenticationMode

	// The properties related to the auto-storage account.
	AutoStorage *AutoStorageBaseProperties

	// Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft
	// managed key. For additional control, a customer-managed key can be used
	// instead.
	Encryption *EncryptionProperties

	// A reference to the Azure key vault associated with the Batch account.
	KeyVaultReference *KeyVaultReference

	// The network profile only takes effect when publicNetworkAccess is enabled.
	NetworkProfile *NetworkProfile

	// The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService,
	// clients may authenticate using access keys or Azure Active Directory. If the
	// mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService.
	PoolAllocationMode *PoolAllocationMode

	// If not specified, the default value is 'enabled'.
	PublicNetworkAccess *PublicNetworkAccessType
}

AccountCreateProperties - The properties of a Batch account.

func (AccountCreateProperties) MarshalJSON added in v0.2.0

func (a AccountCreateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountCreateProperties.

func (*AccountCreateProperties) UnmarshalJSON added in v1.1.0

func (a *AccountCreateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountCreateProperties.

type AccountIdentity added in v0.2.0

type AccountIdentity struct {
	// REQUIRED; The type of identity used for the Batch account.
	Type *ResourceIdentityType

	// The list of user identities associated with the Batch account.
	UserAssignedIdentities map[string]*UserAssignedIdentities

	// READ-ONLY; The principal id of the Batch account. This property will only be provided for a system assigned identity.
	PrincipalID *string

	// READ-ONLY; The tenant id associated with the Batch account. This property will only be provided for a system assigned identity.
	TenantID *string
}

AccountIdentity - The identity of the Batch account, if configured. This is used when the user specifies 'Microsoft.KeyVault' as their Batch account encryption configuration or when ManagedIdentity is selected as the auto-storage authentication mode.

func (AccountIdentity) MarshalJSON added in v0.2.0

func (a AccountIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountIdentity.

func (*AccountIdentity) UnmarshalJSON added in v1.1.0

func (a *AccountIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountIdentity.

type AccountKeyType

type AccountKeyType string

AccountKeyType - The type of account key to regenerate.

const (
	// AccountKeyTypePrimary - The primary account key.
	AccountKeyTypePrimary AccountKeyType = "Primary"
	// AccountKeyTypeSecondary - The secondary account key.
	AccountKeyTypeSecondary AccountKeyType = "Secondary"
)

func PossibleAccountKeyTypeValues

func PossibleAccountKeyTypeValues() []AccountKeyType

PossibleAccountKeyTypeValues returns the possible values for the AccountKeyType const type.

type AccountKeys added in v0.2.0

type AccountKeys struct {
	// READ-ONLY; The Batch account name.
	AccountName *string

	// READ-ONLY; The primary key associated with the account.
	Primary *string

	// READ-ONLY; The secondary key associated with the account.
	Secondary *string
}

AccountKeys - A set of Azure Batch account keys.

func (AccountKeys) MarshalJSON added in v1.1.0

func (a AccountKeys) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountKeys.

func (*AccountKeys) UnmarshalJSON added in v1.1.0

func (a *AccountKeys) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountKeys.

type AccountListResult added in v0.2.0

type AccountListResult struct {
	// The continuation token.
	NextLink *string

	// The collection of Batch accounts returned by the listing operation.
	Value []*Account
}

AccountListResult - Values returned by the List operation.

func (AccountListResult) MarshalJSON added in v0.2.0

func (a AccountListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountListResult.

func (*AccountListResult) UnmarshalJSON added in v1.1.0

func (a *AccountListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountListResult.

type AccountProperties added in v0.2.0

type AccountProperties struct {
	// The network profile only takes effect when publicNetworkAccess is enabled.
	NetworkProfile *NetworkProfile

	// If not specified, the default value is 'enabled'.
	PublicNetworkAccess *PublicNetworkAccessType

	// READ-ONLY; The account endpoint used to interact with the Batch service.
	AccountEndpoint *string

	// READ-ONLY; The active job and job schedule quota for the Batch account.
	ActiveJobAndJobScheduleQuota *int32

	// READ-ONLY; List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane.
	// This does not affect authentication with the control plane.
	AllowedAuthenticationModes []*AuthenticationMode

	// READ-ONLY; Contains information about the auto-storage account associated with a Batch account.
	AutoStorage *AutoStorageProperties

	// READ-ONLY; For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value
	// is not returned.
	DedicatedCoreQuota *int32

	// READ-ONLY; A list of the dedicated core quota per Virtual Machine family for the Batch account. For accounts with PoolAllocationMode
	// set to UserSubscription, quota is managed on the subscription so this value is
	// not returned.
	DedicatedCoreQuotaPerVMFamily []*VirtualMachineFamilyCoreQuota

	// READ-ONLY; If this flag is true, dedicated core quota is enforced via both the dedicatedCoreQuotaPerVMFamily and dedicatedCoreQuota
	// properties on the account. If this flag is false, dedicated core quota is
	// enforced only via the dedicatedCoreQuota property on the account and does not consider Virtual Machine family.
	DedicatedCoreQuotaPerVMFamilyEnforced *bool

	// READ-ONLY; Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using
	// a Microsoft managed key. For additional control, a customer-managed key can be used
	// instead.
	Encryption *EncryptionProperties

	// READ-ONLY; Identifies the Azure key vault associated with a Batch account.
	KeyVaultReference *KeyVaultReference

	// READ-ONLY; For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value
	// is not returned.
	LowPriorityCoreQuota *int32

	// READ-ONLY; The endpoint used by compute node to connect to the Batch node management service.
	NodeManagementEndpoint *string

	// READ-ONLY; The allocation mode for creating pools in the Batch account.
	PoolAllocationMode *PoolAllocationMode

	// READ-ONLY; The pool quota for the Batch account.
	PoolQuota *int32

	// READ-ONLY; List of private endpoint connections associated with the Batch account
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; The provisioned state of the resource
	ProvisioningState *ProvisioningState
}

AccountProperties - Account specific properties.

func (AccountProperties) MarshalJSON added in v0.2.0

func (a AccountProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountProperties.

func (*AccountProperties) UnmarshalJSON added in v1.1.0

func (a *AccountProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountProperties.

type AccountRegenerateKeyParameters added in v0.2.0

type AccountRegenerateKeyParameters struct {
	// REQUIRED; The type of account key to regenerate.
	KeyName *AccountKeyType
}

AccountRegenerateKeyParameters - Parameters supplied to the RegenerateKey operation.

func (AccountRegenerateKeyParameters) MarshalJSON added in v1.1.0

func (a AccountRegenerateKeyParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountRegenerateKeyParameters.

func (*AccountRegenerateKeyParameters) UnmarshalJSON added in v1.1.0

func (a *AccountRegenerateKeyParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountRegenerateKeyParameters.

type AccountUpdateParameters added in v0.2.0

type AccountUpdateParameters struct {
	// The identity of the Batch account.
	Identity *AccountIdentity

	// The properties of the account.
	Properties *AccountUpdateProperties

	// The user-specified tags associated with the account.
	Tags map[string]*string
}

AccountUpdateParameters - Parameters for updating an Azure Batch account.

func (AccountUpdateParameters) MarshalJSON added in v0.2.0

func (a AccountUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountUpdateParameters.

func (*AccountUpdateParameters) UnmarshalJSON added in v1.1.0

func (a *AccountUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountUpdateParameters.

type AccountUpdateProperties added in v0.2.0

type AccountUpdateProperties struct {
	// List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does
	// not affect authentication with the control plane.
	AllowedAuthenticationModes []*AuthenticationMode

	// The properties related to the auto-storage account.
	AutoStorage *AutoStorageBaseProperties

	// Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft
	// managed key. For additional control, a customer-managed key can be used
	// instead.
	Encryption *EncryptionProperties

	// The network profile only takes effect when publicNetworkAccess is enabled.
	NetworkProfile *NetworkProfile

	// If not specified, the default value is 'enabled'.
	PublicNetworkAccess *PublicNetworkAccessType
}

AccountUpdateProperties - The properties of a Batch account.

func (AccountUpdateProperties) MarshalJSON added in v0.2.0

func (a AccountUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountUpdateProperties.

func (*AccountUpdateProperties) UnmarshalJSON added in v1.1.0

func (a *AccountUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountUpdateProperties.

type ActivateApplicationPackageParameters

type ActivateApplicationPackageParameters struct {
	// REQUIRED; The format of the application package binary file.
	Format *string
}

ActivateApplicationPackageParameters - Parameters for an activating an application package.

func (ActivateApplicationPackageParameters) MarshalJSON added in v1.1.0

func (a ActivateApplicationPackageParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ActivateApplicationPackageParameters.

func (*ActivateApplicationPackageParameters) UnmarshalJSON added in v1.1.0

func (a *ActivateApplicationPackageParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ActivateApplicationPackageParameters.

type AllocationState

type AllocationState string

AllocationState - Whether the pool is resizing.

const (
	// AllocationStateSteady - The pool is not resizing. There are no changes to the number of nodes in the pool in progress.
	// A pool enters this state when it is created and when no operations are being performed on the pool to change the number
	// of nodes.
	AllocationStateSteady AllocationState = "Steady"
	// AllocationStateResizing - The pool is resizing; that is, compute nodes are being added to or removed from the pool.
	AllocationStateResizing AllocationState = "Resizing"
	// AllocationStateStopping - The pool was resizing, but the user has requested that the resize be stopped, but the stop request
	// has not yet been completed.
	AllocationStateStopping AllocationState = "Stopping"
)

func PossibleAllocationStateValues

func PossibleAllocationStateValues() []AllocationState

PossibleAllocationStateValues returns the possible values for the AllocationState const type.

type Application

type Application struct {
	// The properties associated with the Application.
	Properties *ApplicationProperties

	// 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
}

Application - Contains information about an application in a Batch account.

func (Application) MarshalJSON

func (a Application) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Application.

func (*Application) UnmarshalJSON added in v1.1.0

func (a *Application) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Application.

type ApplicationClient

type ApplicationClient struct {
	// contains filtered or unexported fields
}

ApplicationClient contains the methods for the Application group. Don't use this type directly, use NewApplicationClient() instead.

func NewApplicationClient

func NewApplicationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationClient, error)

NewApplicationClient creates a new instance of ApplicationClient 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 (*ApplicationClient) Create

func (client *ApplicationClient) Create(ctx context.Context, resourceGroupName string, accountName string, applicationName string, options *ApplicationClientCreateOptions) (ApplicationClientCreateResponse, error)

Create - Adds an application to the specified Batch account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - ApplicationClientCreateOptions contains the optional parameters for the ApplicationClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewApplicationClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "app1", &armbatch.ApplicationClientCreateOptions{Parameters: &armbatch.Application{
		Properties: &armbatch.ApplicationProperties{
			AllowUpdates: to.Ptr(false),
			DisplayName:  to.Ptr("myAppName"),
		},
	},
	})
	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.Application = armbatch.Application{
	// 	Name: to.Ptr("app1"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/applications"),
	// 	Etag: to.Ptr("W/\"0x8D64F8EBB3DC411\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1"),
	// 	Properties: &armbatch.ApplicationProperties{
	// 		AllowUpdates: to.Ptr(false),
	// 		DisplayName: to.Ptr("myAppName"),
	// 	},
	// }
}
Output:

func (*ApplicationClient) Delete

func (client *ApplicationClient) Delete(ctx context.Context, resourceGroupName string, accountName string, applicationName string, options *ApplicationClientDeleteOptions) (ApplicationClientDeleteResponse, error)

Delete - Deletes an application. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - ApplicationClientDeleteOptions contains the optional parameters for the ApplicationClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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)
	}
	_, err = clientFactory.NewApplicationClient().Delete(ctx, "default-azurebatch-japaneast", "sampleacct", "app1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ApplicationClient) Get

func (client *ApplicationClient) Get(ctx context.Context, resourceGroupName string, accountName string, applicationName string, options *ApplicationClientGetOptions) (ApplicationClientGetResponse, error)

Get - Gets information about the specified application. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - ApplicationClientGetOptions contains the optional parameters for the ApplicationClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewApplicationClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "app1", 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.Application = armbatch.Application{
	// 	Name: to.Ptr("app1"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/applications"),
	// 	Etag: to.Ptr("W/\"0x8D64F915BDF7F00\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1"),
	// 	Properties: &armbatch.ApplicationProperties{
	// 		AllowUpdates: to.Ptr(true),
	// 		DisplayName: to.Ptr("Sample Application"),
	// 	},
	// }
}
Output:

func (*ApplicationClient) NewListPager added in v0.4.0

func (client *ApplicationClient) NewListPager(resourceGroupName string, accountName string, options *ApplicationClientListOptions) *runtime.Pager[ApplicationClientListResponse]

NewListPager - Lists all of the applications in the specified account.

Generated from API version 2022-10-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.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewApplicationClient().NewListPager("default-azurebatch-japaneast", "sampleacct", &armbatch.ApplicationClientListOptions{Maxresults: 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.ListApplicationsResult = armbatch.ListApplicationsResult{
		// 	Value: []*armbatch.Application{
		// 		{
		// 			Name: to.Ptr("app1"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/applications"),
		// 			Etag: to.Ptr("W/\"0x8D64F91A9089879\""),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1"),
		// 			Properties: &armbatch.ApplicationProperties{
		// 				AllowUpdates: to.Ptr(false),
		// 				DefaultVersion: to.Ptr("1"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("app1"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/applications"),
		// 			Etag: to.Ptr("W/\"0x8D64F91A9089879\""),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app2"),
		// 			Properties: &armbatch.ApplicationProperties{
		// 				AllowUpdates: to.Ptr(false),
		// 				DefaultVersion: to.Ptr("2.0"),
		// 				DisplayName: to.Ptr("myAppName"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ApplicationClient) Update

func (client *ApplicationClient) Update(ctx context.Context, resourceGroupName string, accountName string, applicationName string, parameters Application, options *ApplicationClientUpdateOptions) (ApplicationClientUpdateResponse, error)

Update - Updates settings for the specified application. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • parameters - The parameters for the request.
  • options - ApplicationClientUpdateOptions contains the optional parameters for the ApplicationClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewApplicationClient().Update(ctx, "default-azurebatch-japaneast", "sampleacct", "app1", armbatch.Application{
		Properties: &armbatch.ApplicationProperties{
			AllowUpdates:   to.Ptr(true),
			DefaultVersion: to.Ptr("2"),
			DisplayName:    to.Ptr("myAppName"),
		},
	}, 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.Application = armbatch.Application{
	// 	Name: to.Ptr("app1"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/applications"),
	// 	Etag: to.Ptr("W/\"0x8D64F915BDF7F00\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1"),
	// 	Properties: &armbatch.ApplicationProperties{
	// 		AllowUpdates: to.Ptr(true),
	// 		DefaultVersion: to.Ptr("2"),
	// 		DisplayName: to.Ptr("myAppName"),
	// 	},
	// }
}
Output:

type ApplicationClientCreateOptions added in v0.2.0

type ApplicationClientCreateOptions struct {
	// The parameters for the request.
	Parameters *Application
}

ApplicationClientCreateOptions contains the optional parameters for the ApplicationClient.Create method.

type ApplicationClientCreateResponse added in v0.2.0

type ApplicationClientCreateResponse struct {
	Application
}

ApplicationClientCreateResponse contains the response from method ApplicationClient.Create.

type ApplicationClientDeleteOptions added in v0.2.0

type ApplicationClientDeleteOptions struct {
}

ApplicationClientDeleteOptions contains the optional parameters for the ApplicationClient.Delete method.

type ApplicationClientDeleteResponse added in v0.2.0

type ApplicationClientDeleteResponse struct {
}

ApplicationClientDeleteResponse contains the response from method ApplicationClient.Delete.

type ApplicationClientGetOptions added in v0.2.0

type ApplicationClientGetOptions struct {
}

ApplicationClientGetOptions contains the optional parameters for the ApplicationClient.Get method.

type ApplicationClientGetResponse added in v0.2.0

type ApplicationClientGetResponse struct {
	Application
}

ApplicationClientGetResponse contains the response from method ApplicationClient.Get.

type ApplicationClientListOptions added in v0.2.0

type ApplicationClientListOptions struct {
	// The maximum number of items to return in the response.
	Maxresults *int32
}

ApplicationClientListOptions contains the optional parameters for the ApplicationClient.NewListPager method.

type ApplicationClientListResponse added in v0.2.0

type ApplicationClientListResponse struct {
	ListApplicationsResult
}

ApplicationClientListResponse contains the response from method ApplicationClient.NewListPager.

type ApplicationClientUpdateOptions added in v0.2.0

type ApplicationClientUpdateOptions struct {
}

ApplicationClientUpdateOptions contains the optional parameters for the ApplicationClient.Update method.

type ApplicationClientUpdateResponse added in v0.2.0

type ApplicationClientUpdateResponse struct {
	Application
}

ApplicationClientUpdateResponse contains the response from method ApplicationClient.Update.

type ApplicationPackage

type ApplicationPackage struct {
	// The properties associated with the Application Package.
	Properties *ApplicationPackageProperties

	// 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
}

ApplicationPackage - An application package which represents a particular version of an application.

func (ApplicationPackage) MarshalJSON

func (a ApplicationPackage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationPackage.

func (*ApplicationPackage) UnmarshalJSON added in v1.1.0

func (a *ApplicationPackage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationPackage.

type ApplicationPackageClient

type ApplicationPackageClient struct {
	// contains filtered or unexported fields
}

ApplicationPackageClient contains the methods for the ApplicationPackage group. Don't use this type directly, use NewApplicationPackageClient() instead.

func NewApplicationPackageClient

func NewApplicationPackageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationPackageClient, error)

NewApplicationPackageClient creates a new instance of ApplicationPackageClient 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 (*ApplicationPackageClient) Activate

func (client *ApplicationPackageClient) Activate(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string, parameters ActivateApplicationPackageParameters, options *ApplicationPackageClientActivateOptions) (ApplicationPackageClientActivateResponse, error)

Activate - Activates the specified application package. This should be done after the ApplicationPackage was created and uploaded. This needs to be done before an ApplicationPackage can be used on Pools or Tasks. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • versionName - The version of the application.
  • parameters - The parameters for the request.
  • options - ApplicationPackageClientActivateOptions contains the optional parameters for the ApplicationPackageClient.Activate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageActivate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewApplicationPackageClient().Activate(ctx, "default-azurebatch-japaneast", "sampleacct", "app1", "1", armbatch.ActivateApplicationPackageParameters{
		Format: to.Ptr("zip"),
	}, 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.ApplicationPackage = armbatch.ApplicationPackage{
	// 	Name: to.Ptr("1"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions"),
	// 	Etag: to.Ptr("W/\"0x8D64FEC83A3B436\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/1"),
	// 	Properties: &armbatch.ApplicationPackageProperties{
	// 		Format: to.Ptr("zip"),
	// 		LastActivationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-27T18:48:09.9330991Z"); return t}()),
	// 		State: to.Ptr(armbatch.PackageStateActive),
	// 	},
	// }
}
Output:

func (*ApplicationPackageClient) Create

func (client *ApplicationPackageClient) Create(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string, options *ApplicationPackageClientCreateOptions) (ApplicationPackageClientCreateResponse, error)

Create - Creates an application package record. The record contains a storageUrl where the package should be uploaded to. Once it is uploaded the ApplicationPackage needs to be activated using ApplicationPackageActive before it can be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • versionName - The version of the application.
  • options - ApplicationPackageClientCreateOptions contains the optional parameters for the ApplicationPackageClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewApplicationPackageClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "app1", "1", &armbatch.ApplicationPackageClientCreateOptions{Parameters: 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.ApplicationPackage = armbatch.ApplicationPackage{
	// 	Name: to.Ptr("1"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions"),
	// 	Etag: to.Ptr("W/\"0x8D64FEC83A3B436\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/1"),
	// 	Properties: &armbatch.ApplicationPackageProperties{
	// 		State: to.Ptr(armbatch.PackageStatePending),
	// 		StorageURL: to.Ptr("http://mystorage1.blob.core.windows.net/myapp?mysas"),
	// 		StorageURLExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-27T18:48:09.9330991Z"); return t}()),
	// 	},
	// }
}
Output:

func (*ApplicationPackageClient) Delete

func (client *ApplicationPackageClient) Delete(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string, options *ApplicationPackageClientDeleteOptions) (ApplicationPackageClientDeleteResponse, error)

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 2022-10-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.
  • versionName - The version of the application.
  • options - ApplicationPackageClientDeleteOptions contains the optional parameters for the ApplicationPackageClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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)
	}
	_, err = clientFactory.NewApplicationPackageClient().Delete(ctx, "default-azurebatch-japaneast", "sampleacct", "app1", "1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ApplicationPackageClient) Get

func (client *ApplicationPackageClient) Get(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string, options *ApplicationPackageClientGetOptions) (ApplicationPackageClientGetResponse, error)

Get - Gets information about the specified application package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • versionName - The version of the application.
  • options - ApplicationPackageClientGetOptions contains the optional parameters for the ApplicationPackageClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewApplicationPackageClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "app1", "1", 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.ApplicationPackage = armbatch.ApplicationPackage{
	// 	Name: to.Ptr("1"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions"),
	// 	Etag: to.Ptr("W/\"0x8D64FEC83A3B436\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/1"),
	// 	Properties: &armbatch.ApplicationPackageProperties{
	// 		Format: to.Ptr("zip"),
	// 		LastActivationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-27T18:48:09.9330991Z"); return t}()),
	// 		State: to.Ptr(armbatch.PackageStateActive),
	// 	},
	// }
}
Output:

func (*ApplicationPackageClient) NewListPager added in v0.4.0

func (client *ApplicationPackageClient) NewListPager(resourceGroupName string, accountName string, applicationName string, options *ApplicationPackageClientListOptions) *runtime.Pager[ApplicationPackageClientListResponse]

NewListPager - Lists all of the application packages in the specified application.

Generated from API version 2022-10-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.
  • options - ApplicationPackageClientListOptions contains the optional parameters for the ApplicationPackageClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewApplicationPackageClient().NewListPager("default-azurebatch-japaneast", "sampleacct", "app1", &armbatch.ApplicationPackageClientListOptions{Maxresults: 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.ListApplicationPackagesResult = armbatch.ListApplicationPackagesResult{
		// 	Value: []*armbatch.ApplicationPackage{
		// 		{
		// 			Name: to.Ptr("1.0"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions"),
		// 			Etag: to.Ptr("W/\"0x8D64FF0B9F47F67\""),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/1.0"),
		// 			Properties: &armbatch.ApplicationPackageProperties{
		// 				State: to.Ptr(armbatch.PackageStatePending),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("2.0"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions"),
		// 			Etag: to.Ptr("W/\"0x8D64FF0B9F47F67\""),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/2.0"),
		// 			Properties: &armbatch.ApplicationPackageProperties{
		// 				Format: to.Ptr("zip"),
		// 				LastActivationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-27T18:48:09.9330991Z"); return t}()),
		// 				State: to.Ptr(armbatch.PackageStateActive),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ApplicationPackageClientActivateOptions added in v0.2.0

type ApplicationPackageClientActivateOptions struct {
}

ApplicationPackageClientActivateOptions contains the optional parameters for the ApplicationPackageClient.Activate method.

type ApplicationPackageClientActivateResponse added in v0.2.0

type ApplicationPackageClientActivateResponse struct {
	ApplicationPackage
}

ApplicationPackageClientActivateResponse contains the response from method ApplicationPackageClient.Activate.

type ApplicationPackageClientCreateOptions added in v0.2.0

type ApplicationPackageClientCreateOptions struct {
	// The parameters for the request.
	Parameters *ApplicationPackage
}

ApplicationPackageClientCreateOptions contains the optional parameters for the ApplicationPackageClient.Create method.

type ApplicationPackageClientCreateResponse added in v0.2.0

type ApplicationPackageClientCreateResponse struct {
	ApplicationPackage
}

ApplicationPackageClientCreateResponse contains the response from method ApplicationPackageClient.Create.

type ApplicationPackageClientDeleteOptions added in v0.2.0

type ApplicationPackageClientDeleteOptions struct {
}

ApplicationPackageClientDeleteOptions contains the optional parameters for the ApplicationPackageClient.Delete method.

type ApplicationPackageClientDeleteResponse added in v0.2.0

type ApplicationPackageClientDeleteResponse struct {
}

ApplicationPackageClientDeleteResponse contains the response from method ApplicationPackageClient.Delete.

type ApplicationPackageClientGetOptions added in v0.2.0

type ApplicationPackageClientGetOptions struct {
}

ApplicationPackageClientGetOptions contains the optional parameters for the ApplicationPackageClient.Get method.

type ApplicationPackageClientGetResponse added in v0.2.0

type ApplicationPackageClientGetResponse struct {
	ApplicationPackage
}

ApplicationPackageClientGetResponse contains the response from method ApplicationPackageClient.Get.

type ApplicationPackageClientListOptions added in v0.2.0

type ApplicationPackageClientListOptions struct {
	// The maximum number of items to return in the response.
	Maxresults *int32
}

ApplicationPackageClientListOptions contains the optional parameters for the ApplicationPackageClient.NewListPager method.

type ApplicationPackageClientListResponse added in v0.2.0

type ApplicationPackageClientListResponse struct {
	ListApplicationPackagesResult
}

ApplicationPackageClientListResponse contains the response from method ApplicationPackageClient.NewListPager.

type ApplicationPackageProperties

type ApplicationPackageProperties struct {
	// READ-ONLY; The format of the application package, if the package is active.
	Format *string

	// READ-ONLY; The time at which the package was last activated, if the package is active.
	LastActivationTime *time.Time

	// READ-ONLY; The current state of the application package.
	State *PackageState

	// READ-ONLY; The URL for the application package in Azure Storage.
	StorageURL *string

	// READ-ONLY; The UTC time at which the Azure Storage URL will expire.
	StorageURLExpiry *time.Time
}

ApplicationPackageProperties - Properties of an application package

func (ApplicationPackageProperties) MarshalJSON

func (a ApplicationPackageProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationPackageProperties.

func (*ApplicationPackageProperties) UnmarshalJSON

func (a *ApplicationPackageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationPackageProperties.

type ApplicationPackageReference

type ApplicationPackageReference struct {
	// REQUIRED; The ID of the application package to install. This must be inside the same batch account as the pool. This can
	// either be a reference to a specific version or the default version if one exists.
	ID *string

	// If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences.
	// If you are calling the REST API directly, the
	// HTTP status code is 409.
	Version *string
}

ApplicationPackageReference - Link to an application package inside the batch account

func (ApplicationPackageReference) MarshalJSON added in v1.1.0

func (a ApplicationPackageReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationPackageReference.

func (*ApplicationPackageReference) UnmarshalJSON added in v1.1.0

func (a *ApplicationPackageReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationPackageReference.

type ApplicationProperties

type ApplicationProperties struct {
	// A value indicating whether packages within the application may be overwritten using the same version string.
	AllowUpdates *bool

	// The package to use if a client requests the application but does not specify a version. This property can only be set to
	// the name of an existing package.
	DefaultVersion *string

	// The display name for the application.
	DisplayName *string
}

ApplicationProperties - The properties associated with the Application.

func (ApplicationProperties) MarshalJSON added in v1.1.0

func (a ApplicationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationProperties.

func (*ApplicationProperties) UnmarshalJSON added in v1.1.0

func (a *ApplicationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProperties.

type AuthenticationMode

type AuthenticationMode string

AuthenticationMode - The authentication mode for the Batch account.

const (
	// AuthenticationModeSharedKey - The authentication mode using shared keys.
	AuthenticationModeSharedKey AuthenticationMode = "SharedKey"
	// AuthenticationModeAAD - The authentication mode using Azure Active Directory.
	AuthenticationModeAAD AuthenticationMode = "AAD"
	// AuthenticationModeTaskAuthenticationToken - The authentication mode using task authentication tokens.
	AuthenticationModeTaskAuthenticationToken AuthenticationMode = "TaskAuthenticationToken"
)

func PossibleAuthenticationModeValues

func PossibleAuthenticationModeValues() []AuthenticationMode

PossibleAuthenticationModeValues returns the possible values for the AuthenticationMode const type.

type AutoScaleRun

type AutoScaleRun struct {
	// REQUIRED; The time at which the autoscale formula was last evaluated.
	EvaluationTime *time.Time

	// An error that occurred when autoscaling a pool.
	Error *AutoScaleRunError

	// Each variable value is returned in the form $variable=value, and variables are separated by semicolons.
	Results *string
}

AutoScaleRun - The results and errors from an execution of a pool autoscale formula.

func (AutoScaleRun) MarshalJSON

func (a AutoScaleRun) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleRun.

func (*AutoScaleRun) UnmarshalJSON

func (a *AutoScaleRun) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleRun.

type AutoScaleRunError

type AutoScaleRunError struct {
	// REQUIRED; An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string

	// REQUIRED; A message describing the error, intended to be suitable for display in a user interface.
	Message *string

	// Additional details about the error.
	Details []*AutoScaleRunError
}

AutoScaleRunError - An error that occurred when autoscaling a pool.

func (AutoScaleRunError) MarshalJSON

func (a AutoScaleRunError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleRunError.

func (*AutoScaleRunError) UnmarshalJSON added in v1.1.0

func (a *AutoScaleRunError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleRunError.

type AutoScaleSettings

type AutoScaleSettings struct {
	// REQUIRED; A formula for the desired number of compute nodes in the pool.
	Formula *string

	// If omitted, the default value is 15 minutes (PT15M).
	EvaluationInterval *string
}

AutoScaleSettings - AutoScale settings for the pool.

func (AutoScaleSettings) MarshalJSON added in v1.1.0

func (a AutoScaleSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoScaleSettings.

func (*AutoScaleSettings) UnmarshalJSON added in v1.1.0

func (a *AutoScaleSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleSettings.

type AutoStorageAuthenticationMode

type AutoStorageAuthenticationMode string

AutoStorageAuthenticationMode - The authentication mode which the Batch service will use to manage the auto-storage account.

const (
	// AutoStorageAuthenticationModeStorageKeys - The Batch service will authenticate requests to auto-storage using storage account
	// keys.
	AutoStorageAuthenticationModeStorageKeys AutoStorageAuthenticationMode = "StorageKeys"
	// AutoStorageAuthenticationModeBatchAccountManagedIdentity - The Batch service will authenticate requests to auto-storage
	// using the managed identity assigned to the Batch account.
	AutoStorageAuthenticationModeBatchAccountManagedIdentity AutoStorageAuthenticationMode = "BatchAccountManagedIdentity"
)

func PossibleAutoStorageAuthenticationModeValues

func PossibleAutoStorageAuthenticationModeValues() []AutoStorageAuthenticationMode

PossibleAutoStorageAuthenticationModeValues returns the possible values for the AutoStorageAuthenticationMode const type.

type AutoStorageBaseProperties

type AutoStorageBaseProperties struct {
	// REQUIRED; The resource ID of the storage account to be used for auto-storage account.
	StorageAccountID *string

	// The authentication mode which the Batch service will use to manage the auto-storage account.
	AuthenticationMode *AutoStorageAuthenticationMode

	// The identity referenced here must be assigned to pools which have compute nodes that need access to auto-storage.
	NodeIdentityReference *ComputeNodeIdentityReference
}

AutoStorageBaseProperties - The properties related to the auto-storage account.

func (AutoStorageBaseProperties) MarshalJSON

func (a AutoStorageBaseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoStorageBaseProperties.

func (*AutoStorageBaseProperties) UnmarshalJSON

func (a *AutoStorageBaseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoStorageBaseProperties.

type AutoStorageProperties

type AutoStorageProperties struct {
	// REQUIRED; The UTC time at which storage keys were last synchronized with the Batch account.
	LastKeySync *time.Time

	// REQUIRED; The resource ID of the storage account to be used for auto-storage account.
	StorageAccountID *string

	// The authentication mode which the Batch service will use to manage the auto-storage account.
	AuthenticationMode *AutoStorageAuthenticationMode

	// The identity referenced here must be assigned to pools which have compute nodes that need access to auto-storage.
	NodeIdentityReference *ComputeNodeIdentityReference
}

AutoStorageProperties - Contains information about the auto-storage account associated with a Batch account.

func (AutoStorageProperties) MarshalJSON

func (a AutoStorageProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoStorageProperties.

func (*AutoStorageProperties) UnmarshalJSON

func (a *AutoStorageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoStorageProperties.

type AutoUserScope

type AutoUserScope string

AutoUserScope - The default value is Pool. If the pool is running Windows a value of Task should be specified if stricter isolation between tasks is required. For example, if the task mutates the registry in a way which could impact other tasks, or if certificates have been specified on the pool which should not be accessible by normal tasks but should be accessible by start tasks.

const (
	// AutoUserScopeTask - Specifies that the service should create a new user for the task.
	AutoUserScopeTask AutoUserScope = "Task"
	// AutoUserScopePool - Specifies that the task runs as the common auto user account which is created on every node in a pool.
	AutoUserScopePool AutoUserScope = "Pool"
)

func PossibleAutoUserScopeValues

func PossibleAutoUserScopeValues() []AutoUserScope

PossibleAutoUserScopeValues returns the possible values for the AutoUserScope const type.

type AutoUserSpecification

type AutoUserSpecification struct {
	// The default value is nonAdmin.
	ElevationLevel *ElevationLevel

	// The default value is Pool. If the pool is running Windows a value of Task should be specified if stricter isolation between
	// tasks is required. For example, if the task mutates the registry in a way
	// which could impact other tasks, or if certificates have been specified on the pool which should not be accessible by normal
	// tasks but should be accessible by start tasks.
	Scope *AutoUserScope
}

AutoUserSpecification - Specifies the parameters for the auto user that runs a task on the Batch service.

func (AutoUserSpecification) MarshalJSON added in v1.1.0

func (a AutoUserSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AutoUserSpecification.

func (*AutoUserSpecification) UnmarshalJSON added in v1.1.0

func (a *AutoUserSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AutoUserSpecification.

type AzureBlobFileSystemConfiguration

type AzureBlobFileSystemConfiguration struct {
	// REQUIRED; The Azure Storage Account name.
	AccountName *string

	// REQUIRED; The Azure Blob Storage Container name.
	ContainerName *string

	// REQUIRED; All file systems are mounted relative to the Batch mounts directory, accessible via the AZBATCHNODEMOUNTSDIR
	// environment variable.
	RelativeMountPath *string

	// This property is mutually exclusive with both sasKey and identity; exactly one must be specified.
	AccountKey *string

	// These are 'net use' options in Windows and 'mount' options in Linux.
	BlobfuseOptions *string

	// This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified.
	IdentityReference *ComputeNodeIdentityReference

	// This property is mutually exclusive with both accountKey and identity; exactly one must be specified.
	SasKey *string
}

AzureBlobFileSystemConfiguration - Information used to connect to an Azure Storage Container using Blobfuse.

func (AzureBlobFileSystemConfiguration) MarshalJSON added in v1.1.0

func (a AzureBlobFileSystemConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureBlobFileSystemConfiguration.

func (*AzureBlobFileSystemConfiguration) UnmarshalJSON added in v1.1.0

func (a *AzureBlobFileSystemConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobFileSystemConfiguration.

type AzureFileShareConfiguration

type AzureFileShareConfiguration struct {
	// REQUIRED; The Azure Storage account key.
	AccountKey *string

	// REQUIRED; The Azure Storage account name.
	AccountName *string

	// REQUIRED; This is of the form 'https://{account}.file.core.windows.net/'.
	AzureFileURL *string

	// REQUIRED; All file systems are mounted relative to the Batch mounts directory, accessible via the AZBATCHNODEMOUNTSDIR
	// environment variable.
	RelativeMountPath *string

	// These are 'net use' options in Windows and 'mount' options in Linux.
	MountOptions *string
}

AzureFileShareConfiguration - Information used to connect to an Azure Fileshare.

func (AzureFileShareConfiguration) MarshalJSON added in v1.1.0

func (a AzureFileShareConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureFileShareConfiguration.

func (*AzureFileShareConfiguration) UnmarshalJSON added in v1.1.0

func (a *AzureFileShareConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareConfiguration.

type CIFSMountConfiguration

type CIFSMountConfiguration struct {
	// REQUIRED; The password to use for authentication against the CIFS file system.
	Password *string

	// REQUIRED; All file systems are mounted relative to the Batch mounts directory, accessible via the AZBATCHNODEMOUNTSDIR
	// environment variable.
	RelativeMountPath *string

	// REQUIRED; The URI of the file system to mount.
	Source *string

	// REQUIRED; The user to use for authentication against the CIFS file system.
	Username *string

	// These are 'net use' options in Windows and 'mount' options in Linux.
	MountOptions *string
}

CIFSMountConfiguration - Information used to connect to a CIFS file system.

func (CIFSMountConfiguration) MarshalJSON added in v1.1.0

func (c CIFSMountConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CIFSMountConfiguration.

func (*CIFSMountConfiguration) UnmarshalJSON added in v1.1.0

func (c *CIFSMountConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CIFSMountConfiguration.

type CachingType

type CachingType string

CachingType - The type of caching to enable for the disk.

const (
	// CachingTypeNone - The caching mode for the disk is not enabled.
	CachingTypeNone CachingType = "None"
	// CachingTypeReadOnly - The caching mode for the disk is read only.
	CachingTypeReadOnly CachingType = "ReadOnly"
	// CachingTypeReadWrite - The caching mode for the disk is read and write.
	CachingTypeReadWrite CachingType = "ReadWrite"
)

func PossibleCachingTypeValues

func PossibleCachingTypeValues() []CachingType

PossibleCachingTypeValues returns the possible values for the CachingType const type.

type Certificate

type Certificate struct {
	// The properties associated with the certificate.
	Properties *CertificateProperties

	// 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
}

Certificate - Contains information about a certificate.

func (Certificate) MarshalJSON

func (c Certificate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Certificate.

func (*Certificate) UnmarshalJSON added in v1.1.0

func (c *Certificate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Certificate.

type CertificateBaseProperties

type CertificateBaseProperties struct {
	// The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.
	Format *CertificateFormat

	// This must match the thumbprint from the name.
	Thumbprint *string

	// This must match the first portion of the certificate name. Currently required to be 'SHA1'.
	ThumbprintAlgorithm *string
}

CertificateBaseProperties - Base certificate properties.

func (CertificateBaseProperties) MarshalJSON

func (c CertificateBaseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CertificateBaseProperties.

func (*CertificateBaseProperties) UnmarshalJSON

func (c *CertificateBaseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateBaseProperties.

type CertificateClient

type CertificateClient struct {
	// contains filtered or unexported fields
}

CertificateClient contains the methods for the Certificate group. Don't use this type directly, use NewCertificateClient() instead.

func NewCertificateClient

func NewCertificateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateClient, error)

NewCertificateClient creates a new instance of CertificateClient 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 (*CertificateClient) BeginDelete

func (client *CertificateClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, certificateName string, options *CertificateClientBeginDeleteOptions) (*runtime.Poller[CertificateClientDeleteResponse], error)

BeginDelete - Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide] instead. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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, and must match the certificate data in the request. For example SHA1-a3d1c5.
  • options - CertificateClientBeginDeleteOptions contains the optional parameters for the CertificateClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().BeginDelete(ctx, "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", 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)
	}
}
Output:

func (*CertificateClient) CancelDeletion

func (client *CertificateClient) CancelDeletion(ctx context.Context, resourceGroupName string, accountName string, certificateName string, options *CertificateClientCancelDeletionOptions) (CertificateClientCancelDeletionResponse, error)

CancelDeletion - If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this operation to set the status of the certificate back to active. If you intend to delete the certificate, you do not need to run this operation after the deletion failed. You must make sure that the certificate is not being used by any resources, and then you can try again to delete the certificate. Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide] instead. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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, and must match the certificate data in the request. For example SHA1-a3d1c5.
  • options - CertificateClientCancelDeletionOptions contains the optional parameters for the CertificateClient.CancelDeletion method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCancelDeletion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().CancelDeletion(ctx, "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", 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.Certificate = armbatch.Certificate{
	// 	Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
	// 	Etag: to.Ptr("W/\"0x8D4EDD513C3EDBB\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Properties: &armbatch.CertificateProperties{
	// 		Format: to.Ptr(armbatch.CertificateFormatPfx),
	// 		Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 		ThumbprintAlgorithm: to.Ptr("sha1"),
	// 		PreviousProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateFailed),
	// 		PreviousProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T00:22:54.3299195Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.4420202Z"); return t}()),
	// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
	// 	},
	// }
}
Output:

func (*CertificateClient) Create

func (client *CertificateClient) Create(ctx context.Context, resourceGroupName string, accountName string, certificateName string, parameters CertificateCreateOrUpdateParameters, options *CertificateClientCreateOptions) (CertificateClientCreateResponse, error)

Create - Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide] instead. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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, and must match the certificate data in the request. For example SHA1-a3d1c5.
  • parameters - Additional parameters for certificate creation.
  • options - CertificateClientCreateOptions contains the optional parameters for the CertificateClient.Create method.
Example (CreateCertificateFull)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_Full.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", armbatch.CertificateCreateOrUpdateParameters{
		Properties: &armbatch.CertificateCreateOrUpdateProperties{
			Format:              to.Ptr(armbatch.CertificateFormatPfx),
			Thumbprint:          to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
			ThumbprintAlgorithm: to.Ptr("sha1"),
			Data:                to.Ptr("MIIJsgIBAzCCCW4GCSqGSIb3DQE..."),
			Password:            to.Ptr("<ExamplePassword>"),
		},
	}, &armbatch.CertificateClientCreateOptions{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.Certificate = armbatch.Certificate{
	// 	Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
	// 	Etag: to.Ptr("W/\"0x8D4EDD5118668F7\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Properties: &armbatch.CertificateProperties{
	// 		Format: to.Ptr(armbatch.CertificateFormatPfx),
	// 		Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 		ThumbprintAlgorithm: to.Ptr("sha1"),
	// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.4420202Z"); return t}()),
	// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
	// 	},
	// }
}
Output:

Example (CreateCertificateMinimalCer)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_MinimalCer.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", armbatch.CertificateCreateOrUpdateParameters{
		Properties: &armbatch.CertificateCreateOrUpdateProperties{
			Format: to.Ptr(armbatch.CertificateFormatCer),
			Data:   to.Ptr("MIICrjCCAZagAwI..."),
		},
	}, &armbatch.CertificateClientCreateOptions{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.Certificate = armbatch.Certificate{
	// 	Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
	// 	Etag: to.Ptr("W/\"0x8D4EDD5118668F7\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Properties: &armbatch.CertificateProperties{
	// 		Format: to.Ptr(armbatch.CertificateFormatCer),
	// 		Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 		ThumbprintAlgorithm: to.Ptr("sha1"),
	// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.4420202Z"); return t}()),
	// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
	// 	},
	// }
}
Output:

Example (CreateCertificateMinimalPfx)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_Minimal.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", armbatch.CertificateCreateOrUpdateParameters{
		Properties: &armbatch.CertificateCreateOrUpdateProperties{
			Data:     to.Ptr("MIIJsgIBAzCCCW4GCSqGSIb3DQE..."),
			Password: to.Ptr("<ExamplePassword>"),
		},
	}, &armbatch.CertificateClientCreateOptions{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.Certificate = armbatch.Certificate{
	// 	Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
	// 	Etag: to.Ptr("W/\"0x8D4EDD5118668F7\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Properties: &armbatch.CertificateProperties{
	// 		Format: to.Ptr(armbatch.CertificateFormatPfx),
	// 		Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 		ThumbprintAlgorithm: to.Ptr("sha1"),
	// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.4420202Z"); return t}()),
	// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
	// 	},
	// }
}
Output:

func (*CertificateClient) Get

func (client *CertificateClient) Get(ctx context.Context, resourceGroupName string, accountName string, certificateName string, options *CertificateClientGetOptions) (CertificateClientGetResponse, error)

Get - Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide] instead. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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, and must match the certificate data in the request. For example SHA1-a3d1c5.
  • options - CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method.
Example (GetCertificate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", 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.Certificate = armbatch.Certificate{
	// 	Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
	// 	Etag: to.Ptr("W/\"0x8D4EDD5118668F7\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Properties: &armbatch.CertificateProperties{
	// 		Format: to.Ptr(armbatch.CertificateFormatPfx),
	// 		Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 		ThumbprintAlgorithm: to.Ptr("sha1"),
	// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.4420202Z"); return t}()),
	// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
	// 	},
	// }
}
Output:

Example (GetCertificateWithDeletionError)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateGetWithDeletionError.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", 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.Certificate = armbatch.Certificate{
	// 	Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
	// 	Etag: to.Ptr("W/\"0x8D4EDD5118668F7\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Properties: &armbatch.CertificateProperties{
	// 		Format: to.Ptr(armbatch.CertificateFormatPfx),
	// 		Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 		ThumbprintAlgorithm: to.Ptr("sha1"),
	// 		DeleteCertificateError: &armbatch.DeleteCertificateError{
	// 			Code: to.Ptr("NodesReferencingCertificate"),
	// 			Message: to.Ptr("The specified certificate is being used by the below mentioned node(s)\nRequestId:2dc78afc-b15b-42d2-8c85-39cb61a0799e\nTime:2017-08-28T10:22:52.8633406Z"),
	// 			Target: to.Ptr("BatchAccount"),
	// 			Details: []*armbatch.DeleteCertificateError{
	// 				{
	// 					Code: to.Ptr("Nodes"),
	// 					Message: to.Ptr("node1, node3"),
	// 			}},
	// 		},
	// 		PreviousProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateDeleting),
	// 		PreviousProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T00:15:25.5625498Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.4420202Z"); return t}()),
	// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
	// 	},
	// }
}
Output:

func (*CertificateClient) NewListByBatchAccountPager added in v0.4.0

func (client *CertificateClient) NewListByBatchAccountPager(resourceGroupName string, accountName string, options *CertificateClientListByBatchAccountOptions) *runtime.Pager[CertificateClientListByBatchAccountResponse]

NewListByBatchAccountPager - Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide] instead.

Generated from API version 2022-10-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 method.
Example (ListCertificates)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().NewListByBatchAccountPager("default-azurebatch-japaneast", "sampleacct", &armbatch.CertificateClientListByBatchAccountOptions{Maxresults: nil,
		Select: 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.ListCertificatesResult = armbatch.ListCertificatesResult{
		// 	Value: []*armbatch.Certificate{
		// 		{
		// 			Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
		// 			Etag: to.Ptr("W/\"0x8D4EDD5118668F7\""),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
		// 			Properties: &armbatch.CertificateProperties{
		// 				Format: to.Ptr(armbatch.CertificateFormatPfx),
		// 				Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
		// 				ThumbprintAlgorithm: to.Ptr("sha1"),
		// 				ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
		// 				ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.4420202Z"); return t}()),
		// 				PublicData: to.Ptr("MIICrjCCAZagAwI..."),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListCertificatesFilterAndSelect)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateListWithFilter.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().NewListByBatchAccountPager("default-azurebatch-japaneast", "sampleacct", &armbatch.CertificateClientListByBatchAccountOptions{Maxresults: nil,
		Select: to.Ptr("properties/format,properties/provisioningState"),
		Filter: to.Ptr("properties/provisioningStateTransitionTime gt '2017-05-01' or properties/provisioningState eq 'Failed'"),
	})
	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.ListCertificatesResult = armbatch.ListCertificatesResult{
		// 	Value: []*armbatch.Certificate{
		// 		{
		// 			Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
		// 			Etag: to.Ptr("W/\"0x8D4EDD5118668F7\""),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
		// 			Properties: &armbatch.CertificateProperties{
		// 				Format: to.Ptr(armbatch.CertificateFormatPfx),
		// 				ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sha1-aeb228ffb0bf67a793d61dce263ebd16949f15a1"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
		// 			Etag: to.Ptr("W/\"0x8D4EDD5118572E0\""),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-aeb228ffb0bf67a793d61dce263ebd16949f15a1"),
		// 			Properties: &armbatch.CertificateProperties{
		// 				Format: to.Ptr(armbatch.CertificateFormatCer),
		// 				ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*CertificateClient) Update

func (client *CertificateClient) Update(ctx context.Context, resourceGroupName string, accountName string, certificateName string, parameters CertificateCreateOrUpdateParameters, options *CertificateClientUpdateOptions) (CertificateClientUpdateResponse, error)

Update - Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide] instead. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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, and must match the certificate data in the request. For example SHA1-a3d1c5.
  • parameters - Certificate entity to update.
  • options - CertificateClientUpdateOptions contains the optional parameters for the CertificateClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewCertificateClient().Update(ctx, "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", armbatch.CertificateCreateOrUpdateParameters{
		Properties: &armbatch.CertificateCreateOrUpdateProperties{
			Data:     to.Ptr("MIIJsgIBAzCCCW4GCSqGSIb3DQE..."),
			Password: to.Ptr("<ExamplePassword>"),
		},
	}, &armbatch.CertificateClientUpdateOptions{IfMatch: 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.Certificate = armbatch.Certificate{
	// 	Name: to.Ptr("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/certificates"),
	// 	Etag: to.Ptr("W/\"0x8D4EDD5118668F7\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 	Properties: &armbatch.CertificateProperties{
	// 		Format: to.Ptr(armbatch.CertificateFormatPfx),
	// 		Thumbprint: to.Ptr("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
	// 		ThumbprintAlgorithm: to.Ptr("sha1"),
	// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.4420202Z"); return t}()),
	// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
	// 	},
	// }
}
Output:

type CertificateClientBeginDeleteOptions added in v0.2.0

type CertificateClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CertificateClientBeginDeleteOptions contains the optional parameters for the CertificateClient.BeginDelete method.

type CertificateClientCancelDeletionOptions added in v0.2.0

type CertificateClientCancelDeletionOptions struct {
}

CertificateClientCancelDeletionOptions contains the optional parameters for the CertificateClient.CancelDeletion method.

type CertificateClientCancelDeletionResponse added in v0.2.0

type CertificateClientCancelDeletionResponse struct {
	Certificate
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientCancelDeletionResponse contains the response from method CertificateClient.CancelDeletion.

type CertificateClientCreateOptions added in v0.2.0

type CertificateClientCreateOptions struct {
	// The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply the operation only if
	// the certificate already exists. If omitted, this operation will always be
	// applied.
	IfMatch *string
	// Set to '*' to allow a new certificate to be created, but to prevent updating an existing certificate. Other values will
	// be ignored.
	IfNoneMatch *string
}

CertificateClientCreateOptions contains the optional parameters for the CertificateClient.Create method.

type CertificateClientCreateResponse added in v0.2.0

type CertificateClientCreateResponse struct {
	Certificate
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientCreateResponse contains the response from method CertificateClient.Create.

type CertificateClientDeleteResponse added in v0.2.0

type CertificateClientDeleteResponse struct {
}

CertificateClientDeleteResponse contains the response from method CertificateClient.BeginDelete.

type CertificateClientGetOptions added in v0.2.0

type CertificateClientGetOptions struct {
}

CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method.

type CertificateClientGetResponse added in v0.2.0

type CertificateClientGetResponse struct {
	Certificate
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientGetResponse contains the response from method CertificateClient.Get.

type CertificateClientListByBatchAccountOptions added in v0.2.0

type CertificateClientListByBatchAccountOptions struct {
	// OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime",
	// "name".
	Filter *string
	// The maximum number of items to return in the response.
	Maxresults *int32
	// Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties
	// under properties/ are valid for selection.
	Select *string
}

CertificateClientListByBatchAccountOptions contains the optional parameters for the CertificateClient.NewListByBatchAccountPager method.

type CertificateClientListByBatchAccountResponse added in v0.2.0

type CertificateClientListByBatchAccountResponse struct {
	ListCertificatesResult
}

CertificateClientListByBatchAccountResponse contains the response from method CertificateClient.NewListByBatchAccountPager.

type CertificateClientUpdateOptions added in v0.2.0

type CertificateClientUpdateOptions struct {
	// The entity state (ETag) version of the certificate to update. This value can be omitted or set to "*" to apply the operation
	// unconditionally.
	IfMatch *string
}

CertificateClientUpdateOptions contains the optional parameters for the CertificateClient.Update method.

type CertificateClientUpdateResponse added in v0.2.0

type CertificateClientUpdateResponse struct {
	Certificate
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientUpdateResponse contains the response from method CertificateClient.Update.

type CertificateCreateOrUpdateParameters

type CertificateCreateOrUpdateParameters struct {
	// The properties associated with the certificate.
	Properties *CertificateCreateOrUpdateProperties

	// 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
}

CertificateCreateOrUpdateParameters - Contains information about a certificate.

func (CertificateCreateOrUpdateParameters) MarshalJSON

func (c CertificateCreateOrUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CertificateCreateOrUpdateParameters.

func (*CertificateCreateOrUpdateParameters) UnmarshalJSON added in v1.1.0

func (c *CertificateCreateOrUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCreateOrUpdateParameters.

type CertificateCreateOrUpdateProperties

type CertificateCreateOrUpdateProperties struct {
	// REQUIRED; The maximum size is 10KB.
	Data *string

	// The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.
	Format *CertificateFormat

	// This must not be specified if the certificate format is Cer.
	Password *string

	// This must match the thumbprint from the name.
	Thumbprint *string

	// This must match the first portion of the certificate name. Currently required to be 'SHA1'.
	ThumbprintAlgorithm *string
}

CertificateCreateOrUpdateProperties - Certificate properties for create operations

func (CertificateCreateOrUpdateProperties) MarshalJSON

func (c CertificateCreateOrUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CertificateCreateOrUpdateProperties.

func (*CertificateCreateOrUpdateProperties) UnmarshalJSON

func (c *CertificateCreateOrUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCreateOrUpdateProperties.

type CertificateFormat

type CertificateFormat string

CertificateFormat - The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

const (
	// CertificateFormatPfx - The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.
	CertificateFormatPfx CertificateFormat = "Pfx"
	// CertificateFormatCer - The certificate is a base64-encoded X.509 certificate.
	CertificateFormatCer CertificateFormat = "Cer"
)

func PossibleCertificateFormatValues

func PossibleCertificateFormatValues() []CertificateFormat

PossibleCertificateFormatValues returns the possible values for the CertificateFormat const type.

type CertificateProperties

type CertificateProperties struct {
	// The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.
	Format *CertificateFormat

	// This must match the thumbprint from the name.
	Thumbprint *string

	// This must match the first portion of the certificate name. Currently required to be 'SHA1'.
	ThumbprintAlgorithm *string

	// READ-ONLY; This is only returned when the certificate provisioningState is 'Failed'.
	DeleteCertificateError *DeleteCertificateError

	// READ-ONLY; The previous provisioned state of the resource
	PreviousProvisioningState *CertificateProvisioningState

	// READ-ONLY; The time at which the certificate entered its previous state.
	PreviousProvisioningStateTransitionTime *time.Time

	// READ-ONLY
	ProvisioningState *CertificateProvisioningState

	// READ-ONLY; The time at which the certificate entered its current state.
	ProvisioningStateTransitionTime *time.Time

	// READ-ONLY; The public key of the certificate.
	PublicData *string
}

CertificateProperties - Certificate properties.

func (CertificateProperties) MarshalJSON

func (c CertificateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CertificateProperties.

func (*CertificateProperties) UnmarshalJSON

func (c *CertificateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateProperties.

type CertificateProvisioningState

type CertificateProvisioningState string
const (
	// CertificateProvisioningStateSucceeded - The certificate is available for use in pools.
	CertificateProvisioningStateSucceeded CertificateProvisioningState = "Succeeded"
	// CertificateProvisioningStateDeleting - The user has requested that the certificate be deleted, but the delete operation
	// has not yet completed. You may not reference the certificate when creating or updating pools.
	CertificateProvisioningStateDeleting CertificateProvisioningState = "Deleting"
	// CertificateProvisioningStateFailed - The user requested that the certificate be deleted, but there are pools that still
	// have references to the certificate, or it is still installed on one or more compute nodes. (The latter can occur if the
	// certificate has been removed from the pool, but the node has not yet restarted. Nodes refresh their certificates only when
	// they restart.) You may use the cancel certificate delete operation to cancel the delete, or the delete certificate operation
	// to retry the delete.
	CertificateProvisioningStateFailed CertificateProvisioningState = "Failed"
)

func PossibleCertificateProvisioningStateValues

func PossibleCertificateProvisioningStateValues() []CertificateProvisioningState

PossibleCertificateProvisioningStateValues returns the possible values for the CertificateProvisioningState const type.

type CertificateReference

type CertificateReference struct {
	// REQUIRED; The fully qualified ID of the certificate to install on the pool. This must be inside the same batch account
	// 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.
	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.
	StoreName *string

	// Which user accounts on the compute node should have access to the private data of the certificate.
	Visibility []*CertificateVisibility
}

CertificateReference - Warning: This object is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide] instead.

func (CertificateReference) MarshalJSON

func (c CertificateReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CertificateReference.

func (*CertificateReference) UnmarshalJSON added in v1.1.0

func (c *CertificateReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateReference.

type CertificateStoreLocation

type CertificateStoreLocation string

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.

const (
	// CertificateStoreLocationCurrentUser - Certificates should be installed to the CurrentUser certificate store.
	CertificateStoreLocationCurrentUser CertificateStoreLocation = "CurrentUser"
	// CertificateStoreLocationLocalMachine - Certificates should be installed to the LocalMachine certificate store.
	CertificateStoreLocationLocalMachine CertificateStoreLocation = "LocalMachine"
)

func PossibleCertificateStoreLocationValues

func PossibleCertificateStoreLocationValues() []CertificateStoreLocation

PossibleCertificateStoreLocationValues returns the possible values for the CertificateStoreLocation const type.

type CertificateVisibility

type CertificateVisibility string
const (
	// CertificateVisibilityStartTask - The certificate should be visible to the user account under which the start task is run.
	// Note that if AutoUser Scope is Pool for both the StartTask and a Task, this certificate will be visible to the Task as
	// well.
	CertificateVisibilityStartTask CertificateVisibility = "StartTask"
	// CertificateVisibilityTask - The certificate should be visible to the user accounts under which job tasks are run.
	CertificateVisibilityTask CertificateVisibility = "Task"
	// CertificateVisibilityRemoteUser - The certificate should be visible to the user accounts under which users remotely access
	// the node.
	CertificateVisibilityRemoteUser CertificateVisibility = "RemoteUser"
)

func PossibleCertificateVisibilityValues

func PossibleCertificateVisibilityValues() []CertificateVisibility

PossibleCertificateVisibilityValues returns the possible values for the CertificateVisibility const type.

type CheckNameAvailabilityParameters

type CheckNameAvailabilityParameters struct {
	// REQUIRED; The name to check for availability
	Name *string

	// CONSTANT; The resource type.
	// Field has constant value "Microsoft.Batch/batchAccounts", any specified value is ignored.
	Type *string
}

CheckNameAvailabilityParameters - Parameters for a check name availability request.

func (CheckNameAvailabilityParameters) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityParameters.

func (*CheckNameAvailabilityParameters) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityParameters.

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	// READ-ONLY; Gets an error message explaining the Reason value in more detail.
	Message *string

	// READ-ONLY; Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available.
	// If false, the name has already been taken or invalid and cannot be used.
	NameAvailable *bool

	// READ-ONLY; Gets the reason that a Batch account name could not be used. The Reason element is only returned if NameAvailable
	// is false.
	Reason *NameAvailabilityReason
}

CheckNameAvailabilityResult - The CheckNameAvailability operation response.

func (CheckNameAvailabilityResult) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.

func (*CheckNameAvailabilityResult) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.

type ClientFactory added in v1.2.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.2.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • 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 (*ClientFactory) NewAccountClient added in v1.2.0

func (c *ClientFactory) NewAccountClient() *AccountClient

func (*ClientFactory) NewApplicationClient added in v1.2.0

func (c *ClientFactory) NewApplicationClient() *ApplicationClient

func (*ClientFactory) NewApplicationPackageClient added in v1.2.0

func (c *ClientFactory) NewApplicationPackageClient() *ApplicationPackageClient

func (*ClientFactory) NewCertificateClient added in v1.2.0

func (c *ClientFactory) NewCertificateClient() *CertificateClient

func (*ClientFactory) NewLocationClient added in v1.2.0

func (c *ClientFactory) NewLocationClient() *LocationClient

func (*ClientFactory) NewOperationsClient added in v1.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

func (*ClientFactory) NewPoolClient added in v1.2.0

func (c *ClientFactory) NewPoolClient() *PoolClient

func (*ClientFactory) NewPrivateEndpointConnectionClient added in v1.2.0

func (c *ClientFactory) NewPrivateEndpointConnectionClient() *PrivateEndpointConnectionClient

func (*ClientFactory) NewPrivateLinkResourceClient added in v1.2.0

func (c *ClientFactory) NewPrivateLinkResourceClient() *PrivateLinkResourceClient

type CloudServiceConfiguration

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
}

CloudServiceConfiguration - The configuration for nodes in a pool based on the Azure Cloud Services platform.

func (CloudServiceConfiguration) MarshalJSON added in v1.1.0

func (c CloudServiceConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudServiceConfiguration.

func (*CloudServiceConfiguration) UnmarshalJSON added in v1.1.0

func (c *CloudServiceConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceConfiguration.

type ComputeNodeDeallocationOption

type ComputeNodeDeallocationOption string

ComputeNodeDeallocationOption - Determines what to do with a node and its running task(s) after it has been selected for deallocation.

const (
	// ComputeNodeDeallocationOptionRequeue - Terminate running task processes and requeue the tasks. The tasks will run again
	// when a node is available. Remove nodes as soon as tasks have been terminated.
	ComputeNodeDeallocationOptionRequeue ComputeNodeDeallocationOption = "Requeue"
	// ComputeNodeDeallocationOptionTerminate - Terminate running tasks. The tasks will be completed with failureInfo indicating
	// that they were terminated, and will not run again. Remove nodes as soon as tasks have been terminated.
	ComputeNodeDeallocationOptionTerminate ComputeNodeDeallocationOption = "Terminate"
	// ComputeNodeDeallocationOptionTaskCompletion - Allow currently running tasks to complete. Schedule no new tasks while waiting.
	// Remove nodes when all tasks have completed.
	ComputeNodeDeallocationOptionTaskCompletion ComputeNodeDeallocationOption = "TaskCompletion"
	// ComputeNodeDeallocationOptionRetainedData - Allow currently running tasks to complete, then wait for all task data retention
	// periods to expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have expired.
	ComputeNodeDeallocationOptionRetainedData ComputeNodeDeallocationOption = "RetainedData"
)

func PossibleComputeNodeDeallocationOptionValues

func PossibleComputeNodeDeallocationOptionValues() []ComputeNodeDeallocationOption

PossibleComputeNodeDeallocationOptionValues returns the possible values for the ComputeNodeDeallocationOption const type.

type ComputeNodeFillType

type ComputeNodeFillType string

ComputeNodeFillType - How tasks should be distributed across compute nodes.

const (
	// ComputeNodeFillTypeSpread - Tasks should be assigned evenly across all nodes in the pool.
	ComputeNodeFillTypeSpread ComputeNodeFillType = "Spread"
	// ComputeNodeFillTypePack - As many tasks as possible (taskSlotsPerNode) should be assigned to each node in the pool before
	// any tasks are assigned to the next node in the pool.
	ComputeNodeFillTypePack ComputeNodeFillType = "Pack"
)

func PossibleComputeNodeFillTypeValues

func PossibleComputeNodeFillTypeValues() []ComputeNodeFillType

PossibleComputeNodeFillTypeValues returns the possible values for the ComputeNodeFillType const type.

type ComputeNodeIdentityReference

type ComputeNodeIdentityReference struct {
	// The ARM resource id of the user assigned identity.
	ResourceID *string
}

ComputeNodeIdentityReference - The reference to a user assigned identity associated with the Batch pool which a compute node will use.

func (ComputeNodeIdentityReference) MarshalJSON added in v1.1.0

func (c ComputeNodeIdentityReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ComputeNodeIdentityReference.

func (*ComputeNodeIdentityReference) UnmarshalJSON added in v1.1.0

func (c *ComputeNodeIdentityReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ComputeNodeIdentityReference.

type ContainerConfiguration

type ContainerConfiguration struct {
	// CONSTANT; The container technology to be used.
	// Field has constant value "DockerCompatible", any specified value is ignored.
	Type *string

	// This is the full image reference, as would be specified to "docker pull". An image will be sourced from the default Docker
	// registry unless the image is fully qualified with an alternative registry.
	ContainerImageNames []*string

	// If any images must be downloaded from a private registry which requires credentials, then those credentials must be provided
	// here.
	ContainerRegistries []*ContainerRegistry
}

ContainerConfiguration - The configuration for container-enabled pools.

func (ContainerConfiguration) MarshalJSON

func (c ContainerConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerConfiguration.

func (*ContainerConfiguration) UnmarshalJSON added in v1.1.0

func (c *ContainerConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerConfiguration.

type ContainerRegistry

type ContainerRegistry struct {
	// The reference to a user assigned identity associated with the Batch pool which a compute node will use.
	IdentityReference *ComputeNodeIdentityReference

	// The password to log into the registry server.
	Password *string

	// If omitted, the default is "docker.io".
	RegistryServer *string

	// The user name to log into the registry server.
	UserName *string
}

ContainerRegistry - A private container registry.

func (ContainerRegistry) MarshalJSON added in v1.1.0

func (c ContainerRegistry) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerRegistry.

func (*ContainerRegistry) UnmarshalJSON added in v1.1.0

func (c *ContainerRegistry) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistry.

type ContainerWorkingDirectory

type ContainerWorkingDirectory string

ContainerWorkingDirectory - A flag to indicate where the container task working directory is. The default is 'taskWorkingDirectory'.

const (
	// ContainerWorkingDirectoryTaskWorkingDirectory - Use the standard Batch service task working directory, which will contain
	// the Task resource files populated by Batch.
	ContainerWorkingDirectoryTaskWorkingDirectory ContainerWorkingDirectory = "TaskWorkingDirectory"
	// ContainerWorkingDirectoryContainerImageDefault - Using container image defined working directory. Beware that this directory
	// will not contain the resource files downloaded by Batch.
	ContainerWorkingDirectoryContainerImageDefault ContainerWorkingDirectory = "ContainerImageDefault"
)

func PossibleContainerWorkingDirectoryValues

func PossibleContainerWorkingDirectoryValues() []ContainerWorkingDirectory

PossibleContainerWorkingDirectoryValues returns the possible values for the ContainerWorkingDirectory const type.

type DataDisk

type DataDisk struct {
	// REQUIRED; The initial disk size in GB when creating new data disk.
	DiskSizeGB *int32

	// REQUIRED; The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct
	// lun. The value must be between 0 and 63, inclusive.
	Lun *int32

	// Values are:
	// none - The caching mode for the disk is not enabled. readOnly - The caching mode for the disk is read only. readWrite -
	// The caching mode for the disk is read and write.
	// The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
	Caching *CachingType

	// If omitted, the default is "Standard_LRS". Values are:
	// StandardLRS - The data disk should use standard locally redundant storage. PremiumLRS - The data disk should use premium
	// locally redundant storage.
	StorageAccountType *StorageAccountType
}

DataDisk - Settings which will be used by the data disks associated to Compute Nodes in the Pool. When using attached data disks, you need to mount and format the disks from within a VM to use them.

func (DataDisk) MarshalJSON added in v1.1.0

func (d DataDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataDisk.

func (*DataDisk) UnmarshalJSON added in v1.1.0

func (d *DataDisk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataDisk.

type DeleteCertificateError

type DeleteCertificateError struct {
	// REQUIRED; An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string

	// REQUIRED; A message describing the error, intended to be suitable for display in a user interface.
	Message *string

	// A list of additional details about the error.
	Details []*DeleteCertificateError

	// The target of the particular error. For example, the name of the property in error.
	Target *string
}

DeleteCertificateError - An error response from the Batch service.

func (DeleteCertificateError) MarshalJSON

func (d DeleteCertificateError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeleteCertificateError.

func (*DeleteCertificateError) UnmarshalJSON added in v1.1.0

func (d *DeleteCertificateError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeleteCertificateError.

type DeploymentConfiguration

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.
	VirtualMachineConfiguration *VirtualMachineConfiguration
}

DeploymentConfiguration - Deployment configuration properties.

func (DeploymentConfiguration) MarshalJSON added in v1.1.0

func (d DeploymentConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentConfiguration.

func (*DeploymentConfiguration) UnmarshalJSON added in v1.1.0

func (d *DeploymentConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentConfiguration.

type DetectorListResult added in v0.3.0

type DetectorListResult struct {
	// The URL to get the next set of results.
	NextLink *string

	// The collection of Batch account detectors returned by the listing operation.
	Value []*DetectorResponse
}

DetectorListResult - Values returned by the List operation.

func (DetectorListResult) MarshalJSON added in v0.3.0

func (d DetectorListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DetectorListResult.

func (*DetectorListResult) UnmarshalJSON added in v1.1.0

func (d *DetectorListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DetectorListResult.

type DetectorResponse added in v0.3.0

type DetectorResponse struct {
	// The properties associated with the detector.
	Properties *DetectorResponseProperties

	// 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
}

DetectorResponse - Contains the information for a detector.

func (DetectorResponse) MarshalJSON added in v1.1.0

func (d DetectorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DetectorResponse.

func (*DetectorResponse) UnmarshalJSON added in v1.1.0

func (d *DetectorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponse.

type DetectorResponseProperties added in v0.3.0

type DetectorResponseProperties struct {
	// A base64 encoded string that represents the content of a detector.
	Value *string
}

DetectorResponseProperties - Detector response properties.

func (DetectorResponseProperties) MarshalJSON added in v1.1.0

func (d DetectorResponseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DetectorResponseProperties.

func (*DetectorResponseProperties) UnmarshalJSON added in v1.1.0

func (d *DetectorResponseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponseProperties.

type DiffDiskSettings

type DiffDiskSettings struct {
	// This property can be used by user in the request to choose which location the operating system should be in. e.g., cache
	// disk space for Ephemeral OS disk provisioning. For more information on
	// Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at
	// https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at
	// https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements.
	Placement *string
}

DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.

func (DiffDiskSettings) MarshalJSON added in v1.1.0

func (d DiffDiskSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiffDiskSettings.

func (*DiffDiskSettings) UnmarshalJSON added in v1.1.0

func (d *DiffDiskSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiffDiskSettings.

type DiskEncryptionConfiguration

type DiskEncryptionConfiguration struct {
	// On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified.
	Targets []*DiskEncryptionTarget
}

DiskEncryptionConfiguration - The disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image.

func (DiskEncryptionConfiguration) MarshalJSON

func (d DiskEncryptionConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiskEncryptionConfiguration.

func (*DiskEncryptionConfiguration) UnmarshalJSON added in v1.1.0

func (d *DiskEncryptionConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionConfiguration.

type DiskEncryptionTarget

type DiskEncryptionTarget string

DiskEncryptionTarget - If omitted, no disks on the compute nodes in the pool will be encrypted.

const (
	// DiskEncryptionTargetOsDisk - The OS Disk on the compute node is encrypted.
	DiskEncryptionTargetOsDisk DiskEncryptionTarget = "OsDisk"
	// DiskEncryptionTargetTemporaryDisk - The temporary disk on the compute node is encrypted. On Linux this encryption applies
	// to other partitions (such as those on mounted data disks) when encryption occurs at boot time.
	DiskEncryptionTargetTemporaryDisk DiskEncryptionTarget = "TemporaryDisk"
)

func PossibleDiskEncryptionTargetValues

func PossibleDiskEncryptionTargetValues() []DiskEncryptionTarget

PossibleDiskEncryptionTargetValues returns the possible values for the DiskEncryptionTarget const type.

type DynamicVNetAssignmentScope added in v0.3.0

type DynamicVNetAssignmentScope string

DynamicVNetAssignmentScope - The scope of dynamic vnet assignment.

const (
	// DynamicVNetAssignmentScopeNone - No dynamic VNet assignment is enabled.
	DynamicVNetAssignmentScopeNone DynamicVNetAssignmentScope = "none"
	// DynamicVNetAssignmentScopeJob - Dynamic VNet assignment is done per-job. If this value is set, the network configuration
	// subnet ID must also be set. This feature requires approval before use, please contact support
	DynamicVNetAssignmentScopeJob DynamicVNetAssignmentScope = "job"
)

func PossibleDynamicVNetAssignmentScopeValues added in v0.3.0

func PossibleDynamicVNetAssignmentScopeValues() []DynamicVNetAssignmentScope

PossibleDynamicVNetAssignmentScopeValues returns the possible values for the DynamicVNetAssignmentScope const type.

type ElevationLevel

type ElevationLevel string

ElevationLevel - The elevation level of the user.

const (
	// ElevationLevelNonAdmin - The user is a standard user without elevated access.
	ElevationLevelNonAdmin ElevationLevel = "NonAdmin"
	// ElevationLevelAdmin - The user is a user with elevated access and operates with full Administrator permissions.
	ElevationLevelAdmin ElevationLevel = "Admin"
)

func PossibleElevationLevelValues

func PossibleElevationLevelValues() []ElevationLevel

PossibleElevationLevelValues returns the possible values for the ElevationLevel const type.

type EncryptionProperties

type EncryptionProperties struct {
	// Type of the key source.
	KeySource *KeySource

	// Additional details when using Microsoft.KeyVault
	KeyVaultProperties *KeyVaultProperties
}

EncryptionProperties - Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.

func (EncryptionProperties) MarshalJSON added in v1.1.0

func (e EncryptionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EncryptionProperties.

func (*EncryptionProperties) UnmarshalJSON added in v1.1.0

func (e *EncryptionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProperties.

type EndpointAccessDefaultAction added in v1.1.0

type EndpointAccessDefaultAction string

EndpointAccessDefaultAction - Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled.

const (
	// EndpointAccessDefaultActionAllow - Allow client access.
	EndpointAccessDefaultActionAllow EndpointAccessDefaultAction = "Allow"
	// EndpointAccessDefaultActionDeny - Deny client access.
	EndpointAccessDefaultActionDeny EndpointAccessDefaultAction = "Deny"
)

func PossibleEndpointAccessDefaultActionValues added in v1.1.0

func PossibleEndpointAccessDefaultActionValues() []EndpointAccessDefaultAction

PossibleEndpointAccessDefaultActionValues returns the possible values for the EndpointAccessDefaultAction const type.

type EndpointAccessProfile added in v1.1.0

type EndpointAccessProfile struct {
	// REQUIRED; Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled.
	DefaultAction *EndpointAccessDefaultAction

	// Array of IP ranges to filter client IP address.
	IPRules []*IPRule
}

EndpointAccessProfile - Network access profile for Batch endpoint.

func (EndpointAccessProfile) MarshalJSON added in v1.1.0

func (e EndpointAccessProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EndpointAccessProfile.

func (*EndpointAccessProfile) UnmarshalJSON added in v1.1.0

func (e *EndpointAccessProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointAccessProfile.

type EndpointDependency

type EndpointDependency struct {
	// READ-ONLY; Human-readable supplemental information about the dependency and when it is applicable.
	Description *string

	// READ-ONLY; The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard.
	DomainName *string

	// READ-ONLY; The list of connection details for this endpoint.
	EndpointDetails []*EndpointDetail
}

EndpointDependency - A domain name and connection details used to access a dependency.

func (EndpointDependency) MarshalJSON

func (e EndpointDependency) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EndpointDependency.

func (*EndpointDependency) UnmarshalJSON added in v1.1.0

func (e *EndpointDependency) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency.

type EndpointDetail

type EndpointDetail struct {
	// READ-ONLY; The port an endpoint is connected to.
	Port *int32
}

EndpointDetail - Details about the connection between the Batch service and the endpoint.

func (EndpointDetail) MarshalJSON added in v1.1.0

func (e EndpointDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EndpointDetail.

func (*EndpointDetail) UnmarshalJSON added in v1.1.0

func (e *EndpointDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail.

type EnvironmentSetting

type EnvironmentSetting struct {
	// REQUIRED; The name of the environment variable.
	Name *string

	// The value of the environment variable.
	Value *string
}

EnvironmentSetting - An environment variable to be set on a task process.

func (EnvironmentSetting) MarshalJSON added in v1.1.0

func (e EnvironmentSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EnvironmentSetting.

func (*EnvironmentSetting) UnmarshalJSON added in v1.1.0

func (e *EnvironmentSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentSetting.

type FixedScaleSettings

type FixedScaleSettings struct {
	// If omitted, the default value is Requeue.
	NodeDeallocationOption *ComputeNodeDeallocationOption

	// The default value is 15 minutes. Timeout values use ISO 8601 format. For example, use PT10M for 10 minutes. The minimum
	// value is 5 minutes. If you specify a value less than 5 minutes, the Batch
	// service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
	ResizeTimeout *string

	// At least one of targetDedicatedNodes, targetLowPriorityNodes must be set.
	TargetDedicatedNodes *int32

	// At least one of targetDedicatedNodes, targetLowPriorityNodes must be set.
	TargetLowPriorityNodes *int32
}

FixedScaleSettings - Fixed scale settings for the pool.

func (FixedScaleSettings) MarshalJSON added in v1.1.0

func (f FixedScaleSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FixedScaleSettings.

func (*FixedScaleSettings) UnmarshalJSON added in v1.1.0

func (f *FixedScaleSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FixedScaleSettings.

type IPAddressProvisioningType

type IPAddressProvisioningType string

IPAddressProvisioningType - The provisioning type for Public IP Addresses for the Batch Pool.

const (
	// IPAddressProvisioningTypeBatchManaged - A public IP will be created and managed by Batch. There may be multiple public
	// IPs depending on the size of the Pool.
	IPAddressProvisioningTypeBatchManaged IPAddressProvisioningType = "BatchManaged"
	// IPAddressProvisioningTypeUserManaged - Public IPs are provided by the user and will be used to provision the Compute Nodes.
	IPAddressProvisioningTypeUserManaged IPAddressProvisioningType = "UserManaged"
	// IPAddressProvisioningTypeNoPublicIPAddresses - No public IP Address will be created for the Compute Nodes in the Pool.
	IPAddressProvisioningTypeNoPublicIPAddresses IPAddressProvisioningType = "NoPublicIPAddresses"
)

func PossibleIPAddressProvisioningTypeValues

func PossibleIPAddressProvisioningTypeValues() []IPAddressProvisioningType

PossibleIPAddressProvisioningTypeValues returns the possible values for the IPAddressProvisioningType const type.

type IPRule added in v1.1.0

type IPRule struct {
	// CONSTANT; Action when client IP address is matched.
	// Field has constant value "Allow", any specified value is ignored.
	Action *string

	// REQUIRED; IPv4 address, or IPv4 address range in CIDR format.
	Value *string
}

IPRule - Rule to filter client IP address.

func (IPRule) MarshalJSON added in v1.1.0

func (i IPRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPRule.

func (*IPRule) UnmarshalJSON added in v1.1.0

func (i *IPRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IPRule.

type ImageReference

type ImageReference struct {
	// This property is mutually exclusive with other properties. The Shared Image Gallery image must have replicas in the same
	// region as the Azure Batch account. For information about the firewall settings
	// for the Batch node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
	ID *string

	// For example, UbuntuServer or WindowsServer.
	Offer *string

	// For example, Canonical or MicrosoftWindowsServer.
	Publisher *string

	// For example, 18.04-LTS or 2022-datacenter.
	SKU *string

	// A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
	Version *string
}

ImageReference - A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual Machine. To get the list of all imageReferences verified by Azure Batch, see the 'List supported node agent SKUs' operation.

func (ImageReference) MarshalJSON added in v1.1.0

func (i ImageReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImageReference.

func (*ImageReference) UnmarshalJSON added in v1.1.0

func (i *ImageReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageReference.

type InboundEndpointProtocol

type InboundEndpointProtocol string

InboundEndpointProtocol - The protocol of the endpoint.

const (
	// InboundEndpointProtocolTCP - Use TCP for the endpoint.
	InboundEndpointProtocolTCP InboundEndpointProtocol = "TCP"
	// InboundEndpointProtocolUDP - Use UDP for the endpoint.
	InboundEndpointProtocolUDP InboundEndpointProtocol = "UDP"
)

func PossibleInboundEndpointProtocolValues

func PossibleInboundEndpointProtocolValues() []InboundEndpointProtocol

PossibleInboundEndpointProtocolValues returns the possible values for the InboundEndpointProtocol const type.

type InboundNatPool

type InboundNatPool struct {
	// REQUIRED; This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876
	// and 29877 as these are reserved. If any reserved values are provided the request fails
	// with HTTP status code 400.
	BackendPort *int32

	// REQUIRED; Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch
	// service. All ranges within a pool must be distinct and cannot overlap. If any reserved or
	// overlapping values are provided the request fails with HTTP status code 400.
	FrontendPortRangeEnd *int32

	// REQUIRED; Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within
	// a pool must be distinct and cannot overlap. If any reserved or overlapping values are
	// provided the request fails with HTTP status code 400.
	FrontendPortRangeStart *int32

	// REQUIRED; The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens.
	// Names must start with a letter or number, must end with a letter, number, or underscore,
	// and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400.
	Name *string

	// REQUIRED; The protocol of the endpoint.
	Protocol *InboundEndpointProtocol

	// The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security
	// group rules are specified, a default rule will be created to allow inbound
	// access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails
	// with HTTP status code 400.
	NetworkSecurityGroupRules []*NetworkSecurityGroupRule
}

InboundNatPool - A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally.

func (InboundNatPool) MarshalJSON

func (i InboundNatPool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InboundNatPool.

func (*InboundNatPool) UnmarshalJSON added in v1.1.0

func (i *InboundNatPool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatPool.

type InterNodeCommunicationState

type InterNodeCommunicationState string

InterNodeCommunicationState - This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'.

const (
	// InterNodeCommunicationStateEnabled - Enable network communication between virtual machines.
	InterNodeCommunicationStateEnabled InterNodeCommunicationState = "Enabled"
	// InterNodeCommunicationStateDisabled - Disable network communication between virtual machines.
	InterNodeCommunicationStateDisabled InterNodeCommunicationState = "Disabled"
)

func PossibleInterNodeCommunicationStateValues

func PossibleInterNodeCommunicationStateValues() []InterNodeCommunicationState

PossibleInterNodeCommunicationStateValues returns the possible values for the InterNodeCommunicationState const type.

type KeySource

type KeySource string

KeySource - Type of the key source.

const (
	// KeySourceMicrosoftBatch - Batch creates and manages the encryption keys used to protect the account data.
	KeySourceMicrosoftBatch KeySource = "Microsoft.Batch"
	// KeySourceMicrosoftKeyVault - The encryption keys used to protect the account data are stored in an external key vault.
	// If this is set then the Batch Account identity must be set to `SystemAssigned` and a valid Key Identifier must also be
	// supplied under the keyVaultProperties.
	KeySourceMicrosoftKeyVault KeySource = "Microsoft.KeyVault"
)

func PossibleKeySourceValues

func PossibleKeySourceValues() []KeySource

PossibleKeySourceValues returns the possible values for the KeySource const type.

type KeyVaultProperties

type KeyVaultProperties struct {
	// Full path to the versioned secret. Example https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053.
	// To be usable the following prerequisites must be met:
	// The Batch Account has a System Assigned identity The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap
	// permissions The KeyVault has soft-delete and purge protection enabled
	KeyIdentifier *string
}

KeyVaultProperties - KeyVault configuration when using an encryption KeySource of Microsoft.KeyVault.

func (KeyVaultProperties) MarshalJSON added in v1.1.0

func (k KeyVaultProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.

func (*KeyVaultProperties) UnmarshalJSON added in v1.1.0

func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties.

type KeyVaultReference

type KeyVaultReference struct {
	// REQUIRED; The resource ID of the Azure key vault associated with the Batch account.
	ID *string

	// REQUIRED; The URL of the Azure key vault associated with the Batch account.
	URL *string
}

KeyVaultReference - Identifies the Azure key vault associated with a Batch account.

func (KeyVaultReference) MarshalJSON added in v1.1.0

func (k KeyVaultReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultReference.

func (*KeyVaultReference) UnmarshalJSON added in v1.1.0

func (k *KeyVaultReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultReference.

type LinuxUserConfiguration

type LinuxUserConfiguration struct {
	// The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks
	// the gid.
	Gid *int32

	// The private key must not be password protected. The private key is used to automatically configure asymmetric-key based
	// authentication for SSH between nodes in a Linux pool when the pool's
	// enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by
	// placing the key pair into the user's .ssh directory. If not specified,
	// password-less SSH is not configured between nodes (no modification of the user's .ssh directory is done).
	SSHPrivateKey *string

	// The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks
	// the uid.
	UID *int32
}

LinuxUserConfiguration - Properties used to create a user account on a Linux node.

func (LinuxUserConfiguration) MarshalJSON added in v1.1.0

func (l LinuxUserConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinuxUserConfiguration.

func (*LinuxUserConfiguration) UnmarshalJSON added in v1.1.0

func (l *LinuxUserConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinuxUserConfiguration.

type ListApplicationPackagesResult

type ListApplicationPackagesResult struct {
	// The URL to get the next set of results.
	NextLink *string

	// The list of application packages.
	Value []*ApplicationPackage
}

ListApplicationPackagesResult - The result of performing list application packages.

func (ListApplicationPackagesResult) MarshalJSON

func (l ListApplicationPackagesResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListApplicationPackagesResult.

func (*ListApplicationPackagesResult) UnmarshalJSON added in v1.1.0

func (l *ListApplicationPackagesResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListApplicationPackagesResult.

type ListApplicationsResult

type ListApplicationsResult struct {
	// The URL to get the next set of results.
	NextLink *string

	// The list of applications.
	Value []*Application
}

ListApplicationsResult - The result of performing list applications.

func (ListApplicationsResult) MarshalJSON

func (l ListApplicationsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListApplicationsResult.

func (*ListApplicationsResult) UnmarshalJSON added in v1.1.0

func (l *ListApplicationsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListApplicationsResult.

type ListCertificatesResult

type ListCertificatesResult struct {
	// The continuation token.
	NextLink *string

	// The collection of returned certificates.
	Value []*Certificate
}

ListCertificatesResult - Values returned by the List operation.

func (ListCertificatesResult) MarshalJSON

func (l ListCertificatesResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListCertificatesResult.

func (*ListCertificatesResult) UnmarshalJSON added in v1.1.0

func (l *ListCertificatesResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListCertificatesResult.

type ListPoolsResult

type ListPoolsResult struct {
	// The continuation token.
	NextLink *string

	// The collection of returned pools.
	Value []*Pool
}

ListPoolsResult - Values returned by the List operation.

func (ListPoolsResult) MarshalJSON

func (l ListPoolsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListPoolsResult.

func (*ListPoolsResult) UnmarshalJSON added in v1.1.0

func (l *ListPoolsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListPoolsResult.

type ListPrivateEndpointConnectionsResult

type ListPrivateEndpointConnectionsResult struct {
	// The continuation token.
	NextLink *string

	// The collection of returned private endpoint connection.
	Value []*PrivateEndpointConnection
}

ListPrivateEndpointConnectionsResult - Values returned by the List operation.

func (ListPrivateEndpointConnectionsResult) MarshalJSON

func (l ListPrivateEndpointConnectionsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListPrivateEndpointConnectionsResult.

func (*ListPrivateEndpointConnectionsResult) UnmarshalJSON added in v1.1.0

func (l *ListPrivateEndpointConnectionsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListPrivateEndpointConnectionsResult.

type ListPrivateLinkResourcesResult

type ListPrivateLinkResourcesResult struct {
	// The continuation token.
	NextLink *string

	// The collection of returned private link resources.
	Value []*PrivateLinkResource
}

ListPrivateLinkResourcesResult - Values returned by the List operation.

func (ListPrivateLinkResourcesResult) MarshalJSON

func (l ListPrivateLinkResourcesResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListPrivateLinkResourcesResult.

func (*ListPrivateLinkResourcesResult) UnmarshalJSON added in v1.1.0

func (l *ListPrivateLinkResourcesResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListPrivateLinkResourcesResult.

type LocationClient

type LocationClient struct {
	// contains filtered or unexported fields
}

LocationClient contains the methods for the Location group. Don't use this type directly, use NewLocationClient() instead.

func NewLocationClient

func NewLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationClient, error)

NewLocationClient creates a new instance of LocationClient 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 (*LocationClient) CheckNameAvailability

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 2022-10-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 method.
Example (LocationCheckNameAvailabilityAlreadyExists)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationCheckNameAvailability_AlreadyExists.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewLocationClient().CheckNameAvailability(ctx, "japaneast", armbatch.CheckNameAvailabilityParameters{
		Name: to.Ptr("existingaccountname"),
		Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	}, 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.CheckNameAvailabilityResult = armbatch.CheckNameAvailabilityResult{
	// 	Message: to.Ptr("An account named 'existingaccountname' is already in use."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armbatch.NameAvailabilityReasonAlreadyExists),
	// }
}
Output:

Example (LocationCheckNameAvailabilityAvailable)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationCheckNameAvailability_Available.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewLocationClient().CheckNameAvailability(ctx, "japaneast", armbatch.CheckNameAvailabilityParameters{
		Name: to.Ptr("newaccountname"),
		Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	}, 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.CheckNameAvailabilityResult = armbatch.CheckNameAvailabilityResult{
	// 	NameAvailable: to.Ptr(true),
	// }
}
Output:

func (*LocationClient) GetQuotas

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 2022-10-01

  • locationName - The region for which to retrieve Batch service quotas.
  • options - LocationClientGetQuotasOptions contains the optional parameters for the LocationClient.GetQuotas method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationGetQuotas.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewLocationClient().GetQuotas(ctx, "japaneast", 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.LocationQuota = armbatch.LocationQuota{
	// 	AccountQuota: to.Ptr[int32](1),
	// }
}
Output:

func (*LocationClient) NewListSupportedCloudServiceSKUsPager added in v0.4.0

NewListSupportedCloudServiceSKUsPager - Gets the list of Batch supported Cloud Service VM sizes available at the given location.

Generated from API version 2022-10-01

  • locationName - The region for which to retrieve Batch service supported SKUs.
  • options - LocationClientListSupportedCloudServiceSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedCloudServiceSKUsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationListCloudServiceSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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"),
		// 	}},
		// }
	}
}
Output:

func (*LocationClient) NewListSupportedVirtualMachineSKUsPager added in v0.4.0

NewListSupportedVirtualMachineSKUsPager - Gets the list of Batch supported Virtual Machine VM sizes available at the given location.

Generated from API version 2022-10-01

  • locationName - The region for which to retrieve Batch service supported SKUs.
  • options - LocationClientListSupportedVirtualMachineSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedVirtualMachineSKUsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationListVirtualMachineSkus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().NewListSupportedVirtualMachineSKUsPager("japaneast", &armbatch.LocationClientListSupportedVirtualMachineSKUsOptions{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("Standard_D1_v2"),
		// 			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("standardDFamily"),
		// 	}},
		// }
	}
}
Output:

type LocationClientCheckNameAvailabilityOptions added in v0.2.0

type LocationClientCheckNameAvailabilityOptions struct {
}

LocationClientCheckNameAvailabilityOptions contains the optional parameters for the LocationClient.CheckNameAvailability method.

type LocationClientCheckNameAvailabilityResponse added in v0.2.0

type LocationClientCheckNameAvailabilityResponse struct {
	CheckNameAvailabilityResult
}

LocationClientCheckNameAvailabilityResponse contains the response from method LocationClient.CheckNameAvailability.

type LocationClientGetQuotasOptions added in v0.2.0

type LocationClientGetQuotasOptions struct {
}

LocationClientGetQuotasOptions contains the optional parameters for the LocationClient.GetQuotas method.

type LocationClientGetQuotasResponse added in v0.2.0

type LocationClientGetQuotasResponse struct {
	LocationQuota
}

LocationClientGetQuotasResponse contains the response from method LocationClient.GetQuotas.

type LocationClientListSupportedCloudServiceSKUsOptions added in v0.2.0

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
}

LocationClientListSupportedCloudServiceSKUsOptions contains the optional parameters for the LocationClient.NewListSupportedCloudServiceSKUsPager method.

type LocationClientListSupportedCloudServiceSKUsResponse added in v0.2.0

type LocationClientListSupportedCloudServiceSKUsResponse struct {
	SupportedSKUsResult
}

LocationClientListSupportedCloudServiceSKUsResponse contains the response from method LocationClient.NewListSupportedCloudServiceSKUsPager.

type LocationClientListSupportedVirtualMachineSKUsOptions added in v0.2.0

type LocationClientListSupportedVirtualMachineSKUsOptions 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 LocationClientListSupportedVirtualMachineSKUsResponse added in v0.2.0

type LocationClientListSupportedVirtualMachineSKUsResponse struct {
	SupportedSKUsResult
}

LocationClientListSupportedVirtualMachineSKUsResponse contains the response from method LocationClient.NewListSupportedVirtualMachineSKUsPager.

type LocationQuota added in v0.2.0

type LocationQuota struct {
	// READ-ONLY; The number of Batch accounts that may be created under the subscription in the specified region.
	AccountQuota *int32
}

LocationQuota - Quotas associated with a Batch region for a particular subscription.

func (LocationQuota) MarshalJSON added in v1.1.0

func (l LocationQuota) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LocationQuota.

func (*LocationQuota) UnmarshalJSON added in v1.1.0

func (l *LocationQuota) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LocationQuota.

type LoginMode

type LoginMode string

LoginMode - Specifies login mode for the user. The default value for VirtualMachineConfiguration pools is interactive mode and for CloudServiceConfiguration pools is batch mode.

const (
	// LoginModeBatch - The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel
	// processes.
	LoginModeBatch LoginMode = "Batch"
	// LoginModeInteractive - The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions associated
	// with the interactive login mode. If this is the case for an application used in your task, then this option is recommended.
	LoginModeInteractive LoginMode = "Interactive"
)

func PossibleLoginModeValues

func PossibleLoginModeValues() []LoginMode

PossibleLoginModeValues returns the possible values for the LoginMode const type.

type MetadataItem

type MetadataItem struct {
	// REQUIRED; The name of the metadata item.
	Name *string

	// REQUIRED; The value of the metadata item.
	Value *string
}

MetadataItem - The Batch service does not assign any meaning to this metadata; it is solely for the use of user code.

func (MetadataItem) MarshalJSON added in v1.1.0

func (m MetadataItem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetadataItem.

func (*MetadataItem) UnmarshalJSON added in v1.1.0

func (m *MetadataItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetadataItem.

type MountConfiguration

type MountConfiguration struct {
	// This property is mutually exclusive with all other properties.
	AzureBlobFileSystemConfiguration *AzureBlobFileSystemConfiguration

	// This property is mutually exclusive with all other properties.
	AzureFileShareConfiguration *AzureFileShareConfiguration

	// This property is mutually exclusive with all other properties.
	CifsMountConfiguration *CIFSMountConfiguration

	// This property is mutually exclusive with all other properties.
	NfsMountConfiguration *NFSMountConfiguration
}

MountConfiguration - The file system to mount on each node.

func (MountConfiguration) MarshalJSON added in v1.1.0

func (m MountConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MountConfiguration.

func (*MountConfiguration) UnmarshalJSON added in v1.1.0

func (m *MountConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MountConfiguration.

type NFSMountConfiguration

type NFSMountConfiguration struct {
	// REQUIRED; All file systems are mounted relative to the Batch mounts directory, accessible via the AZBATCHNODEMOUNTSDIR
	// environment variable.
	RelativeMountPath *string

	// REQUIRED; The URI of the file system to mount.
	Source *string

	// These are 'net use' options in Windows and 'mount' options in Linux.
	MountOptions *string
}

NFSMountConfiguration - Information used to connect to an NFS file system.

func (NFSMountConfiguration) MarshalJSON added in v1.1.0

func (n NFSMountConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NFSMountConfiguration.

func (*NFSMountConfiguration) UnmarshalJSON added in v1.1.0

func (n *NFSMountConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NFSMountConfiguration.

type NameAvailabilityReason

type NameAvailabilityReason string

NameAvailabilityReason - Gets the reason that a Batch account name could not be used. The Reason element is only returned if NameAvailable is false.

const (
	// NameAvailabilityReasonInvalid - The requested name is invalid.
	NameAvailabilityReasonInvalid NameAvailabilityReason = "Invalid"
	// NameAvailabilityReasonAlreadyExists - The requested name is already in use.
	NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists"
)

func PossibleNameAvailabilityReasonValues

func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason

PossibleNameAvailabilityReasonValues returns the possible values for the NameAvailabilityReason const type.

type NetworkConfiguration

type NetworkConfiguration struct {
	// The scope of dynamic vnet assignment.
	DynamicVNetAssignmentScope *DynamicVNetAssignmentScope

	// Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.
	EndpointConfiguration *PoolEndpointConfiguration

	// This property is only supported on Pools with the virtualMachineConfiguration property.
	PublicIPAddressConfiguration *PublicIPAddressConfiguration

	// The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should
	// have enough free IP addresses to accommodate the number of nodes in the pool. If
	// the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes and a resize error will
	// occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic
	// Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow
	// communication from the Azure Batch service to be able to schedule tasks on
	// the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG).
	// 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
	SubnetID *string
}

NetworkConfiguration - The network configuration for a pool.

func (NetworkConfiguration) MarshalJSON added in v1.1.0

func (n NetworkConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkConfiguration.

func (*NetworkConfiguration) UnmarshalJSON added in v1.1.0

func (n *NetworkConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConfiguration.

type NetworkProfile added in v1.1.0

type NetworkProfile struct {
	// Network access profile for batchAccount endpoint (Batch account data plane API).
	AccountAccess *EndpointAccessProfile

	// Network access profile for nodeManagement endpoint (Batch service managing compute nodes for Batch pools).
	NodeManagementAccess *EndpointAccessProfile
}

NetworkProfile - Network profile for Batch account, which contains network rule settings for each endpoint.

func (NetworkProfile) MarshalJSON added in v1.1.0

func (n NetworkProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkProfile.

func (*NetworkProfile) UnmarshalJSON added in v1.1.0

func (n *NetworkProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.

type NetworkSecurityGroupRule

type NetworkSecurityGroupRule struct {
	// REQUIRED; The action that should be taken for a specified IP address, subnet range or tag.
	Access *NetworkSecurityGroupRuleAccess

	// REQUIRED; Priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher
	// the priority. For example, rules could be specified with order numbers of 150, 250, and
	// 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities
	// are 150 to 4096. If any reserved or duplicate values are provided the request
	// fails with HTTP status code 400.
	Priority *int32

	// REQUIRED; Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for
	// all addresses). If any other values are provided the request fails with HTTP status
	// code 400.
	SourceAddressPrefix *string

	// Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. 100-200). The ports should in the
	// range of 0 to 65535 and the port ranges or ports can't overlap. If any other
	// values are provided the request fails with HTTP status code 400. Default value will be *.
	SourcePortRanges []*string
}

NetworkSecurityGroupRule - A network security group rule to apply to an inbound endpoint.

func (NetworkSecurityGroupRule) MarshalJSON

func (n NetworkSecurityGroupRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityGroupRule.

func (*NetworkSecurityGroupRule) UnmarshalJSON added in v1.1.0

func (n *NetworkSecurityGroupRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityGroupRule.

type NetworkSecurityGroupRuleAccess

type NetworkSecurityGroupRuleAccess string

NetworkSecurityGroupRuleAccess - The action that should be taken for a specified IP address, subnet range or tag.

const (
	// NetworkSecurityGroupRuleAccessAllow - Allow access.
	NetworkSecurityGroupRuleAccessAllow NetworkSecurityGroupRuleAccess = "Allow"
	// NetworkSecurityGroupRuleAccessDeny - Deny access.
	NetworkSecurityGroupRuleAccessDeny NetworkSecurityGroupRuleAccess = "Deny"
)

func PossibleNetworkSecurityGroupRuleAccessValues

func PossibleNetworkSecurityGroupRuleAccessValues() []NetworkSecurityGroupRuleAccess

PossibleNetworkSecurityGroupRuleAccessValues returns the possible values for the NetworkSecurityGroupRuleAccess const type.

type NodeCommunicationMode added in v1.1.0

type NodeCommunicationMode string

NodeCommunicationMode - Determines how a pool communicates with the Batch service.

const (
	// NodeCommunicationModeDefault - The node communication mode is automatically set by the Batch service.
	NodeCommunicationModeDefault NodeCommunicationMode = "Default"
	// NodeCommunicationModeClassic - Nodes using the Classic communication mode require inbound TCP communication on ports 29876
	// and 29877 from the "BatchNodeManagement.{region}" service tag and outbound TCP communication on port 443 to the "Storage.region"
	// and "BatchNodeManagement.{region}" service tags.
	NodeCommunicationModeClassic NodeCommunicationMode = "Classic"
	// NodeCommunicationModeSimplified - Nodes using the Simplified communication mode require outbound TCP communication on port
	// 443 to the "BatchNodeManagement.{region}" service tag. No open inbound ports are required.
	NodeCommunicationModeSimplified NodeCommunicationMode = "Simplified"
)

func PossibleNodeCommunicationModeValues added in v1.1.0

func PossibleNodeCommunicationModeValues() []NodeCommunicationMode

PossibleNodeCommunicationModeValues returns the possible values for the NodeCommunicationMode const type.

type NodePlacementConfiguration

type NodePlacementConfiguration struct {
	// Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy.
	Policy *NodePlacementPolicyType
}

NodePlacementConfiguration - Allocation configuration used by Batch Service to provision the nodes.

func (NodePlacementConfiguration) MarshalJSON added in v1.1.0

func (n NodePlacementConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NodePlacementConfiguration.

func (*NodePlacementConfiguration) UnmarshalJSON added in v1.1.0

func (n *NodePlacementConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NodePlacementConfiguration.

type NodePlacementPolicyType

type NodePlacementPolicyType string

NodePlacementPolicyType - The default value is regional.

const (
	// NodePlacementPolicyTypeRegional - All nodes in the pool will be allocated in the same region.
	NodePlacementPolicyTypeRegional NodePlacementPolicyType = "Regional"
	// NodePlacementPolicyTypeZonal - Nodes in the pool will be spread across different zones with best effort balancing.
	NodePlacementPolicyTypeZonal NodePlacementPolicyType = "Zonal"
)

func PossibleNodePlacementPolicyTypeValues

func PossibleNodePlacementPolicyTypeValues() []NodePlacementPolicyType

PossibleNodePlacementPolicyTypeValues returns the possible values for the NodePlacementPolicyType const type.

type OSDisk

type OSDisk struct {
	// Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
	EphemeralOSDiskSettings *DiffDiskSettings
}

OSDisk - Settings for the operating system disk of the virtual machine.

func (OSDisk) MarshalJSON added in v1.1.0

func (o OSDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OSDisk.

func (*OSDisk) UnmarshalJSON added in v1.1.0

func (o *OSDisk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OSDisk.

type Operation

type Operation struct {
	// The object that describes the operation.
	Display *OperationDisplay

	// Indicates whether the operation is a data action
	IsDataAction *bool

	// This is of the format {provider}/{resource}/{operation}
	Name *string

	// The intended executor of the operation.
	Origin *string

	// Properties of the operation.
	Properties any
}

Operation - A REST API operation

func (Operation) MarshalJSON added in v1.1.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// The friendly name of the operation
	Description *string

	// For example: read, write, delete, or listKeys/action
	Operation *string

	// Friendly name of the resource provider.
	Provider *string

	// The resource type on which the operation is performed.
	Resource *string
}

OperationDisplay - The object that describes the operation.

func (OperationDisplay) MarshalJSON added in v1.1.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// The URL to get the next set of operation list results if there are any.
	NextLink *string

	// The list of operations supported by the resource provider.
	Value []*Operation
}

OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v1.1.0

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Lists available operations for the Microsoft.Batch provider

Generated from API version 2022-10-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/OperationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewOperationsClient().NewListPager(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.OperationListResult = armbatch.OperationListResult{
		// 	Value: []*armbatch.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/providers/Microsoft.Insights/diagnosticSettings/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the diagnostic setting for the resource"),
		// 				Operation: to.Ptr("Read diagnostic setting"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Accounts"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/providers/Microsoft.Insights/diagnosticSettings/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Creates or updates the diagnostic setting for the resource"),
		// 				Operation: to.Ptr("Write diagnostic setting"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Accounts"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/providers/Microsoft.Insights/logDefinitions/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the available logs for the Batch service"),
		// 				Operation: to.Ptr("Read Batch service log definitions"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Account Log Definitions"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 			Properties: map[string]any{
		// 				"serviceSpecification":map[string]any{
		// 					"logSpecifications":[]any{
		// 						map[string]any{
		// 							"name": "ServiceLog",
		// 							"blobDuration": "PT1H",
		// 							"displayName": "Service Logs",
		// 						},
		// 					},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/providers/Microsoft.Insights/metricDefinitions/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the available metrics for the Batch service"),
		// 				Operation: to.Ptr("Read Batch service metric definitions"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Account Metric Definitions"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 			Properties: map[string]any{
		// 				"serviceSpecification":map[string]any{
		// 					"metricSpecifications":[]any{
		// 						map[string]any{
		// 							"name": "CoreCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Total number of dedicated cores in the batch account",
		// 							"displayName": "Dedicated Core Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "TotalNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Total number of dedicated nodes in the batch account",
		// 							"displayName": "Dedicated Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "LowPriorityCoreCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Total number of low-priority cores in the batch account",
		// 							"displayName": "LowPriority Core Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "TotalLowPriorityNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Total number of low-priority nodes in the batch account",
		// 							"displayName": "Low-Priority Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "CreatingNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of nodes being created",
		// 							"displayName": "Creating Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "StartingNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of nodes starting",
		// 							"displayName": "Starting Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "WaitingForStartTaskNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of nodes waiting for the Start Task to complete",
		// 							"displayName": "Waiting For Start Task Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "StartTaskFailedNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of nodes where the Start Task has failed",
		// 							"displayName": "Start Task Failed Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "IdleNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of idle nodes",
		// 							"displayName": "Idle Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "OfflineNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of offline nodes",
		// 							"displayName": "Offline Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "RebootingNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of rebooting nodes",
		// 							"displayName": "Rebooting Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "ReimagingNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of reimaging nodes",
		// 							"displayName": "Reimaging Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "RunningNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of running nodes",
		// 							"displayName": "Running Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "LeavingPoolNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of nodes leaving the Pool",
		// 							"displayName": "Leaving Pool Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "UnusableNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of unusable nodes",
		// 							"displayName": "Unusable Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "PreemptedNodeCount",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"displayDescription": "Number of preempted nodes",
		// 							"displayName": "Preempted Node Count",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"lockAggregationType": "Total",
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "TaskStartEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "poolId",
		// 									"displayName": "Pool ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of tasks that have started",
		// 							"displayName": "Task Start Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "TaskCompleteEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "poolId",
		// 									"displayName": "Pool ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of tasks that have completed",
		// 							"displayName": "Task Complete Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "TaskFailEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "poolId",
		// 									"displayName": "Pool ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of tasks that have completed in a failed state",
		// 							"displayName": "Task Fail Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "PoolCreateEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "poolId",
		// 									"displayName": "Pool ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of pools that have been created",
		// 							"displayName": "Pool Create Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "PoolResizeStartEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "poolId",
		// 									"displayName": "Pool ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of pool resizes that have started",
		// 							"displayName": "Pool Resize Start Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "PoolResizeCompleteEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "poolId",
		// 									"displayName": "Pool ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of pool resizes that have completed",
		// 							"displayName": "Pool Resize Complete Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "PoolDeleteStartEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "poolId",
		// 									"displayName": "Pool ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of pool deletes that have started",
		// 							"displayName": "Pool Delete Start Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "PoolDeleteCompleteEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "poolId",
		// 									"displayName": "Pool ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of pool deletes that have completed",
		// 							"displayName": "Pool Delete Complete Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "JobDeleteCompleteEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of jobs that have been successfully deleted.",
		// 							"displayName": "Job Delete Complete Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "JobDeleteStartEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of jobs that have been requested to be deleted.",
		// 							"displayName": "Job Delete Start Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "JobDisableCompleteEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of jobs that have been successfully disabled.",
		// 							"displayName": "Job Disable Complete Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "JobDisableStartEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of jobs that have been requested to be disabled.",
		// 							"displayName": "Job Disable Start Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "JobStartEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of jobs that have been successfully started.",
		// 							"displayName": "Job Start Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "JobTerminateCompleteEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of jobs that have been successfully terminated.",
		// 							"displayName": "Job Terminate Complete Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 						map[string]any{
		// 							"name": "JobTerminateStartEvent",
		// 							"aggregationType": "Total",
		// 							"availabilities":[]any{
		// 								map[string]any{
		// 									"blobDuration": "PT1H",
		// 									"timeGrain": "PT1M",
		// 								},
		// 							},
		// 							"dimensions":[]any{
		// 								map[string]any{
		// 									"name": "jobId",
		// 									"displayName": "Job ID",
		// 									"toBeExportedForShoebox": true,
		// 								},
		// 							},
		// 							"displayDescription": "Total number of jobs that have been requested to be terminated.",
		// 							"displayName": "Job Terminate Start Events",
		// 							"enableRegionalMdmAccount": false,
		// 							"fillGapWithZero": false,
		// 							"supportsInstanceLevelAggregation": false,
		// 							"unit": "Count",
		// 						},
		// 					},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/jobs/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists jobs on a Batch account or gets the properties of a job"),
		// 				Operation: to.Ptr("List or Get Jobs"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Jobs"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/jobs/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Creates a new job on a Batch account or updates an existing job"),
		// 				Operation: to.Ptr("Create or Update Job"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Jobs"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/jobs/delete"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Deletes a job from a Batch account"),
		// 				Operation: to.Ptr("Delete Job"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Jobs"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/jobSchedules/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists job schedules on a Batch account or gets the properties of a job schedule"),
		// 				Operation: to.Ptr("List or Get Job Schedules"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Job Schedules"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/jobSchedules/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Creates a new job schedule on a Batch account or updates an existing job schedule"),
		// 				Operation: to.Ptr("Create or Update Job Schedule"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Job Schedules"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/jobSchedules/delete"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Deletes a job schedule from a Batch account"),
		// 				Operation: to.Ptr("Delete Job Schedule"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Job Schedules"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/operations/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists operations available on Microsoft.Batch resource provider"),
		// 				Operation: to.Ptr("List Available Batch Operations"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Available Batch Operations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists Batch accounts or gets the properties of a Batch account"),
		// 				Operation: to.Ptr("List or Get Batch Accounts"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Accounts"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Creates a new Batch account or updates an existing Batch account"),
		// 				Operation: to.Ptr("Create or Update Batch Account"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Accounts"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/delete"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Deletes a Batch account"),
		// 				Operation: to.Ptr("Delete Batch Account"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Accounts"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/listkeys/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists access keys for a Batch account"),
		// 				Operation: to.Ptr("List Batch Account Keys"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Accounts"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/regeneratekeys/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Regenerates access keys for a Batch account"),
		// 				Operation: to.Ptr("Regenerate Batch Account Keys"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Accounts"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/locations/quotas/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets Batch quotas of the specified subscription at the specified Azure region"),
		// 				Operation: to.Ptr("Get Batch Quotas"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Quotas"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/locations/checkNameAvailability/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Checks that the account name is valid and not in use."),
		// 				Operation: to.Ptr("Check Name Availability"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Name Availability"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/operationResults/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the results of a long running Batch account operation"),
		// 				Operation: to.Ptr("Get Batch account operation results"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Resource Provider"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/locations/accountOperationResults/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the results of a long running Batch account operation"),
		// 				Operation: to.Ptr("Get Batch account operation results"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Resource Provider"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/register/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Registers the subscription for the Batch Resource Provider and enables the creation of Batch accounts"),
		// 				Operation: to.Ptr("Register the Batch Resource Provider"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Resource Provider"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/unregister/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Unregisters the subscription for the Batch Resource Provider preventing the creation of Batch accounts"),
		// 				Operation: to.Ptr("Unregister the Batch Resource Provider"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Resource Provider"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/syncAutoStorageKeys/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Synchronizes access keys for the auto storage account configured for a Batch account"),
		// 				Operation: to.Ptr("Synchronize Auto Storage Account Keys"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Accounts"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/applications/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists applications or gets the properties of an application"),
		// 				Operation: to.Ptr("List or Get Applications"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Applications"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/applications/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Creates a new application or updates an existing application"),
		// 				Operation: to.Ptr("Create or Update Application"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Applications"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/applications/delete"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Deletes an application"),
		// 				Operation: to.Ptr("Delete Application"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Applications"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the properties of an application package"),
		// 				Operation: to.Ptr("Get Application Package"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Application Packages"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Creates a new application package or updates an existing application package"),
		// 				Operation: to.Ptr("Create or Update Application Package"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Application Packages"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions/delete"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Deletes an application package"),
		// 				Operation: to.Ptr("Delete Application Package"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Application Packages"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/applications/versions/activate/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Activates an application package"),
		// 				Operation: to.Ptr("Activate Application Package"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Application Packages"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/certificates/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists certificates on a Batch account or gets the properties of a certificate"),
		// 				Operation: to.Ptr("List or Get Certificates"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Certificates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/certificates/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Creates a new certificate on a Batch account or updates an existing certificate"),
		// 				Operation: to.Ptr("Create or Update Certificate"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Certificates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/certificates/delete"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Deletes a certificate from a Batch account"),
		// 				Operation: to.Ptr("Delete Certificate"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Certificates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/certificates/cancelDelete/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Cancels the failed deletion of a certificate on a Batch account"),
		// 				Operation: to.Ptr("Cancel Delete Certificate"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Certificates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/certificateOperationResults/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the results of a long running certificate operation on a Batch account"),
		// 				Operation: to.Ptr("Get Certificate Operation Results"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Certificates"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/pools/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists pools on a Batch account or gets the properties of a pool"),
		// 				Operation: to.Ptr("List or Get Pools"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Pools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/pools/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Creates a new pool on a Batch account or updates an existing pool"),
		// 				Operation: to.Ptr("Create or Update Pool"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Pools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/pools/delete"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Deletes a pool from a Batch account"),
		// 				Operation: to.Ptr("Delete Pool"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Pools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/pools/stopResize/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Stops an ongoing resize operation on a Batch account pool"),
		// 				Operation: to.Ptr("Stop Pool Resize"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Pools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/pools/disableAutoscale/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Disables automatic scaling for a Batch account pool"),
		// 				Operation: to.Ptr("Disable Pool AutoScale"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Pools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/poolOperationResults/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the results of a long running pool operation on a Batch account"),
		// 				Operation: to.Ptr("Get Pool Operation Results"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Pools"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/locations/virtualMachineSkus/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists available Batch supported Virtual Machine VM sizes at the given location"),
		// 				Operation: to.Ptr("List Supported Batch Virtual Machine VM"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Supported Skus"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/locations/cloudServiceSkus/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists available Batch supported Cloud Service VM sizes at the given location"),
		// 				Operation: to.Ptr("List Supported Batch Cloud Service VM"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Batch Supported Skus"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateLinkResources/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the properties of a Private link resource or Lists Private link resources on a Batch account"),
		// 				Operation: to.Ptr("Get or List Private link resources"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateLinkResources"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnections/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Update an existing Private endpoint connection on a Batch account"),
		// 				Operation: to.Ptr("Update Private endpoint connection"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateEndpointConnections"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnections/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets Private endpoint connection or Lists Private endpoint connections on a Batch account"),
		// 				Operation: to.Ptr("Get or List Private endpoint connection"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateEndpointConnections"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnectionResults/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the results of a long running Batch account private endpoint connection operation"),
		// 				Operation: to.Ptr("Get Batch account private endpoint connection operation results"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateEndpointConnections"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnectionProxies/validate/action"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Validates a Private endpoint connection proxy on a Batch account"),
		// 				Operation: to.Ptr("Validates a Private endpoint connection proxy"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateEndpointConnectionProxies"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnectionProxies/write"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Create a new Private endpoint connection proxy on a Batch account"),
		// 				Operation: to.Ptr("Create or Update Private endpoint connection proxy"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateEndpointConnectionProxies"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnectionProxies/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets Private endpoint connection proxy on a Batch account"),
		// 				Operation: to.Ptr("Get Private endpoint connection proxy"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateEndpointConnectionProxies"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnectionProxies/delete"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Delete a Private endpoint connection proxy on a Batch account"),
		// 				Operation: to.Ptr("Delete Private endpoint connection proxy"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateEndpointConnectionProxies"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnectionProxyResults/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Gets the results of a long running Batch account private endpoint connection proxy operation"),
		// 				Operation: to.Ptr("Get Batch account private endpoint connection proxy operation results"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("PrivateEndpointConnectionProxies"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Batch/batchAccounts/outboundNetworkDependenciesEndpoints/read"),
		// 			Display: &armbatch.OperationDisplay{
		// 				Description: to.Ptr("Lists the outbound network dependency endpoints for a Batch account"),
		// 				Operation: to.Ptr("List Outbound Network Dependency Endpoints"),
		// 				Provider: to.Ptr("Microsoft Batch"),
		// 				Resource: to.Ptr("Outbound Network Dependencies Endpoints"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OutboundEnvironmentEndpoint

type OutboundEnvironmentEndpoint struct {
	// READ-ONLY; The type of service that the Batch service connects to.
	Category *string

	// READ-ONLY; The endpoints for this service to which the Batch service makes outbound calls.
	Endpoints []*EndpointDependency
}

OutboundEnvironmentEndpoint - A collection of related endpoints from the same service for which the Batch service requires outbound access.

func (OutboundEnvironmentEndpoint) MarshalJSON

func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint.

func (*OutboundEnvironmentEndpoint) UnmarshalJSON added in v1.1.0

func (o *OutboundEnvironmentEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint.

type OutboundEnvironmentEndpointCollection

type OutboundEnvironmentEndpointCollection struct {
	// The continuation token.
	NextLink *string

	// READ-ONLY; The collection of outbound network dependency endpoints returned by the listing operation.
	Value []*OutboundEnvironmentEndpoint
}

OutboundEnvironmentEndpointCollection - Values returned by the List operation.

func (OutboundEnvironmentEndpointCollection) MarshalJSON

func (o OutboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointCollection.

func (*OutboundEnvironmentEndpointCollection) UnmarshalJSON added in v1.1.0

func (o *OutboundEnvironmentEndpointCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointCollection.

type PackageState

type PackageState string

PackageState - The current state of the application package.

const (
	// PackageStatePending - The application package has been created but has not yet been activated.
	PackageStatePending PackageState = "Pending"
	// PackageStateActive - The application package is ready for use.
	PackageStateActive PackageState = "Active"
)

func PossiblePackageStateValues

func PossiblePackageStateValues() []PackageState

PossiblePackageStateValues returns the possible values for the PackageState const type.

type Pool

type Pool struct {
	// The type of identity used for the Batch Pool.
	Identity *PoolIdentity

	// The properties associated with the pool.
	Properties *PoolProperties

	// 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
}

Pool - Contains information about a pool.

func (Pool) MarshalJSON

func (p Pool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Pool.

func (*Pool) UnmarshalJSON added in v1.1.0

func (p *Pool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Pool.

type PoolAllocationMode

type PoolAllocationMode string

PoolAllocationMode - The allocation mode for creating pools in the Batch account.

const (
	// PoolAllocationModeBatchService - Pools will be allocated in subscriptions owned by the Batch service.
	PoolAllocationModeBatchService PoolAllocationMode = "BatchService"
	// PoolAllocationModeUserSubscription - Pools will be allocated in a subscription owned by the user.
	PoolAllocationModeUserSubscription PoolAllocationMode = "UserSubscription"
)

func PossiblePoolAllocationModeValues

func PossiblePoolAllocationModeValues() []PoolAllocationMode

PossiblePoolAllocationModeValues returns the possible values for the PoolAllocationMode const type.

type PoolClient

type PoolClient struct {
	// contains filtered or unexported fields
}

PoolClient contains the methods for the Pool group. Don't use this type directly, use NewPoolClient() instead.

func NewPoolClient

func NewPoolClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoolClient, error)

NewPoolClient creates a new instance of PoolClient 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 (*PoolClient) BeginDelete

func (client *PoolClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolClientBeginDeleteOptions) (*runtime.Poller[PoolClientDeleteResponse], error)

BeginDelete - Deletes the specified pool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - PoolClientBeginDeleteOptions contains the optional parameters for the PoolClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPoolClient().BeginDelete(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", 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)
	}
}
Output:

func (*PoolClient) Create

func (client *PoolClient) Create(ctx context.Context, resourceGroupName string, accountName string, poolName string, parameters Pool, options *PoolClientCreateOptions) (PoolClientCreateResponse, error)

Create - Creates a new pool inside the specified account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • parameters - Additional parameters for pool creation.
  • options - PoolClientCreateOptions contains the optional parameters for the PoolClient.Create method.
Example (CreatePoolCustomImage)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_SharedImageGallery.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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{
				VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
					ImageReference: &armbatch.ImageReference{
						ID: to.Ptr("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
					},
					NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
				},
			},
			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.AllocationStateSteady),
	// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				ImageReference: &armbatch.ImageReference{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			FixedScale: &armbatch.FixedScaleSettings{
	// 				TargetDedicatedNodes: to.Ptr[int32](0),
	// 				TargetLowPriorityNodes: to.Ptr[int32](0),
	// 			},
	// 		},
	// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 		},
	// 		TaskSlotsPerNode: to.Ptr[int32](1),
	// 		VMSize: to.Ptr("STANDARD_D4"),
	// 	},
	// }
}
Output:

Example (CreatePoolFullCloudServiceConfiguration)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_CloudServiceConfiguration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.9407275Z"); 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.9407275Z"); 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.9407275Z"); 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.9407275Z"); 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"),
	// 				},
	// 			}
}
Output:

Example (CreatePoolFullVirtualMachineConfiguration)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_VirtualMachineConfiguration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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{
				VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
					DataDisks: []*armbatch.DataDisk{
						{
							Caching:            to.Ptr(armbatch.CachingTypeReadWrite),
							DiskSizeGB:         to.Ptr[int32](30),
							Lun:                to.Ptr[int32](0),
							StorageAccountType: to.Ptr(armbatch.StorageAccountTypePremiumLRS),
						},
						{
							Caching:            to.Ptr(armbatch.CachingTypeNone),
							DiskSizeGB:         to.Ptr[int32](200),
							Lun:                to.Ptr[int32](1),
							StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
						}},
					DiskEncryptionConfiguration: &armbatch.DiskEncryptionConfiguration{
						Targets: []*armbatch.DiskEncryptionTarget{
							to.Ptr(armbatch.DiskEncryptionTargetOsDisk),
							to.Ptr(armbatch.DiskEncryptionTargetTemporaryDisk)},
					},
					ImageReference: &armbatch.ImageReference{
						Offer:     to.Ptr("WindowsServer"),
						Publisher: to.Ptr("MicrosoftWindowsServer"),
						SKU:       to.Ptr("2016-Datacenter-SmallDisk"),
						Version:   to.Ptr("latest"),
					},
					LicenseType:    to.Ptr("Windows_Server"),
					NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
					NodePlacementConfiguration: &armbatch.NodePlacementConfiguration{
						Policy: to.Ptr(armbatch.NodePlacementPolicyTypeZonal),
					},
					OSDisk: &armbatch.OSDisk{
						EphemeralOSDiskSettings: &armbatch.DiffDiskSettings{
							Placement: to.Ptr("CacheDisk"),
						},
					},
					WindowsConfiguration: &armbatch.WindowsConfiguration{
						EnableAutomaticUpdates: to.Ptr(false),
					},
				},
			},
			NetworkConfiguration: &armbatch.NetworkConfiguration{
				EndpointConfiguration: &armbatch.PoolEndpointConfiguration{
					InboundNatPools: []*armbatch.InboundNatPool{
						{
							Name:                   to.Ptr("testnat"),
							BackendPort:            to.Ptr[int32](12001),
							FrontendPortRangeEnd:   to.Ptr[int32](15100),
							FrontendPortRangeStart: to.Ptr[int32](15000),
							NetworkSecurityGroupRules: []*armbatch.NetworkSecurityGroupRule{
								{
									Access:              to.Ptr(armbatch.NetworkSecurityGroupRuleAccessAllow),
									Priority:            to.Ptr[int32](150),
									SourceAddressPrefix: to.Ptr("192.100.12.45"),
									SourcePortRanges: []*string{
										to.Ptr("1"),
										to.Ptr("2")},
								},
								{
									Access:              to.Ptr(armbatch.NetworkSecurityGroupRuleAccessDeny),
									Priority:            to.Ptr[int32](3500),
									SourceAddressPrefix: to.Ptr("*"),
									SourcePortRanges: []*string{
										to.Ptr("*")},
								}},
							Protocol: to.Ptr(armbatch.InboundEndpointProtocolTCP),
						}},
				},
			},
			ScaleSettings: &armbatch.ScaleSettings{
				AutoScale: &armbatch.AutoScaleSettings{
					EvaluationInterval: to.Ptr("PT5M"),
					Formula:            to.Ptr("$TargetDedicatedNodes=1"),
				},
			},
			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.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				DataDisks: []*armbatch.DataDisk{
	// 					{
	// 						Caching: to.Ptr(armbatch.CachingTypeReadWrite),
	// 						DiskSizeGB: to.Ptr[int32](30),
	// 						Lun: to.Ptr[int32](0),
	// 						StorageAccountType: to.Ptr(armbatch.StorageAccountTypePremiumLRS),
	// 					},
	// 					{
	// 						Caching: to.Ptr(armbatch.CachingTypeNone),
	// 						DiskSizeGB: to.Ptr[int32](200),
	// 						Lun: to.Ptr[int32](1),
	// 						StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
	// 				}},
	// 				DiskEncryptionConfiguration: &armbatch.DiskEncryptionConfiguration{
	// 					Targets: []*armbatch.DiskEncryptionTarget{
	// 						to.Ptr(armbatch.DiskEncryptionTargetOsDisk),
	// 						to.Ptr(armbatch.DiskEncryptionTargetTemporaryDisk)},
	// 					},
	// 					ImageReference: &armbatch.ImageReference{
	// 						Offer: to.Ptr("WindowsServer"),
	// 						Publisher: to.Ptr("MicrosoftWindowsServer"),
	// 						SKU: to.Ptr("2016-Datacenter-SmallDisk"),
	// 						Version: to.Ptr("latest"),
	// 					},
	// 					LicenseType: to.Ptr("Windows_Server"),
	// 					NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
	// 					NodePlacementConfiguration: &armbatch.NodePlacementConfiguration{
	// 						Policy: to.Ptr(armbatch.NodePlacementPolicyTypeZonal),
	// 					},
	// 					WindowsConfiguration: &armbatch.WindowsConfiguration{
	// 						EnableAutomaticUpdates: to.Ptr(false),
	// 					},
	// 				},
	// 			},
	// 			InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 			LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 			NetworkConfiguration: &armbatch.NetworkConfiguration{
	// 				EndpointConfiguration: &armbatch.PoolEndpointConfiguration{
	// 					InboundNatPools: []*armbatch.InboundNatPool{
	// 						{
	// 							Name: to.Ptr("testnat"),
	// 							BackendPort: to.Ptr[int32](12001),
	// 							FrontendPortRangeEnd: to.Ptr[int32](15100),
	// 							FrontendPortRangeStart: to.Ptr[int32](15000),
	// 							NetworkSecurityGroupRules: []*armbatch.NetworkSecurityGroupRule{
	// 								{
	// 									Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessAllow),
	// 									Priority: to.Ptr[int32](150),
	// 									SourceAddressPrefix: to.Ptr("192.100.12.45"),
	// 									SourcePortRanges: []*string{
	// 										to.Ptr("1"),
	// 										to.Ptr("2")},
	// 									},
	// 									{
	// 										Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessDeny),
	// 										Priority: to.Ptr[int32](3500),
	// 										SourceAddressPrefix: to.Ptr("*"),
	// 										SourcePortRanges: []*string{
	// 											to.Ptr("*")},
	// 									}},
	// 									Protocol: to.Ptr(armbatch.InboundEndpointProtocolTCP),
	// 							}},
	// 						},
	// 					},
	// 					ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 					ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 					ScaleSettings: &armbatch.ScaleSettings{
	// 						AutoScale: &armbatch.AutoScaleSettings{
	// 							EvaluationInterval: to.Ptr("PT5M"),
	// 							Formula: to.Ptr("$TargetDedicatedNodes=1"),
	// 						},
	// 					},
	// 					TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 						NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 					},
	// 					TaskSlotsPerNode: to.Ptr[int32](1),
	// 					VMSize: to.Ptr("STANDARD_D4"),
	// 				},
	// 			}
}
Output:

Example (CreatePoolMinimalCloudServiceConfiguration)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); 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.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); 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.9407275Z"); 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"),
	// 	},
	// }
}
Output:

Example (CreatePoolMinimalVirtualMachineConfiguration)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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{
				VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
					ImageReference: &armbatch.ImageReference{
						Offer:     to.Ptr("UbuntuServer"),
						Publisher: to.Ptr("Canonical"),
						SKU:       to.Ptr("18.04-LTS"),
						Version:   to.Ptr("latest"),
					},
					NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
				},
			},
			ScaleSettings: &armbatch.ScaleSettings{
				AutoScale: &armbatch.AutoScaleSettings{
					EvaluationInterval: to.Ptr("PT5M"),
					Formula:            to.Ptr("$TargetDedicatedNodes=1"),
				},
			},
			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.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				ImageReference: &armbatch.ImageReference{
	// 					Offer: to.Ptr("UbuntuServer"),
	// 					Publisher: to.Ptr("Canonical"),
	// 					SKU: to.Ptr("18.04-LTS"),
	// 					Version: to.Ptr("latest"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			AutoScale: &armbatch.AutoScaleSettings{
	// 				EvaluationInterval: to.Ptr("PT5M"),
	// 				Formula: to.Ptr("$TargetDedicatedNodes=1"),
	// 			},
	// 		},
	// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 		},
	// 		TaskSlotsPerNode: to.Ptr[int32](1),
	// 		VMSize: to.Ptr("STANDARD_D4"),
	// 	},
	// }
}
Output:

Example (CreatePoolNoPublicIp)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_NoPublicIPAddresses.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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{
				VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
					ImageReference: &armbatch.ImageReference{
						ID: to.Ptr("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
					},
					NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
				},
			},
			NetworkConfiguration: &armbatch.NetworkConfiguration{
				PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
					Provision: to.Ptr(armbatch.IPAddressProvisioningTypeNoPublicIPAddresses),
				},
				SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
			},
			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.AllocationStateSteady),
	// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				ImageReference: &armbatch.ImageReference{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		NetworkConfiguration: &armbatch.NetworkConfiguration{
	// 			PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
	// 				Provision: to.Ptr(armbatch.IPAddressProvisioningTypeNoPublicIPAddresses),
	// 			},
	// 			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.9407275Z"); return t}()),
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			FixedScale: &armbatch.FixedScaleSettings{
	// 				TargetDedicatedNodes: to.Ptr[int32](0),
	// 				TargetLowPriorityNodes: to.Ptr[int32](0),
	// 			},
	// 		},
	// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 		},
	// 		TaskSlotsPerNode: to.Ptr[int32](1),
	// 		VMSize: to.Ptr("STANDARD_D4"),
	// 	},
	// }
}
Output:

Example (CreatePoolPublicIPs)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_PublicIPs.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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{
				VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
					ImageReference: &armbatch.ImageReference{
						ID: to.Ptr("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
					},
					NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
				},
			},
			NetworkConfiguration: &armbatch.NetworkConfiguration{
				PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
					IPAddressIDs: []*string{
						to.Ptr("/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135")},
					Provision: to.Ptr(armbatch.IPAddressProvisioningTypeUserManaged),
				},
				SubnetID: to.Ptr("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
			},
			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.AllocationStateSteady),
	// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				ImageReference: &armbatch.ImageReference{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		NetworkConfiguration: &armbatch.NetworkConfiguration{
	// 			PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
	// 				IPAddressIDs: []*string{
	// 					to.Ptr("/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135")},
	// 					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.9407275Z"); return t}()),
	// 			ScaleSettings: &armbatch.ScaleSettings{
	// 				FixedScale: &armbatch.FixedScaleSettings{
	// 					TargetDedicatedNodes: to.Ptr[int32](0),
	// 					TargetLowPriorityNodes: to.Ptr[int32](0),
	// 				},
	// 			},
	// 			TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 				NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 			},
	// 			TaskSlotsPerNode: to.Ptr[int32](1),
	// 			VMSize: to.Ptr("STANDARD_D4"),
	// 		},
	// 	}
}
Output:

Example (CreatePoolUserAssignedIdentities)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_UserAssignedIdentities.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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{
		Identity: &armbatch.PoolIdentity{
			Type: to.Ptr(armbatch.PoolIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
				"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
				"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
			},
		},
		Properties: &armbatch.PoolProperties{
			DeploymentConfiguration: &armbatch.DeploymentConfiguration{
				VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
					ImageReference: &armbatch.ImageReference{
						Offer:     to.Ptr("UbuntuServer"),
						Publisher: to.Ptr("Canonical"),
						SKU:       to.Ptr("18.04-LTS"),
						Version:   to.Ptr("latest"),
					},
					NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
				},
			},
			ScaleSettings: &armbatch.ScaleSettings{
				AutoScale: &armbatch.AutoScaleSettings{
					EvaluationInterval: to.Ptr("PT5M"),
					Formula:            to.Ptr("$TargetDedicatedNodes=1"),
				},
			},
			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"),
	// 	Identity: &armbatch.PoolIdentity{
	// 		Type: to.Ptr(armbatch.PoolIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
	// 			"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armbatch.UserAssignedIdentities{
	// 				ClientID: to.Ptr("clientId1"),
	// 				PrincipalID: to.Ptr("principalId1"),
	// 			},
	// 			"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armbatch.UserAssignedIdentities{
	// 				ClientID: to.Ptr("clientId2"),
	// 				PrincipalID: to.Ptr("principalId2"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armbatch.PoolProperties{
	// 		AllocationState: to.Ptr(armbatch.AllocationStateResizing),
	// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				ImageReference: &armbatch.ImageReference{
	// 					Offer: to.Ptr("UbuntuServer"),
	// 					Publisher: to.Ptr("Canonical"),
	// 					SKU: to.Ptr("18.04-LTS"),
	// 					Version: to.Ptr("latest"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.9407275Z"); return t}()),
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			AutoScale: &armbatch.AutoScaleSettings{
	// 				EvaluationInterval: to.Ptr("PT5M"),
	// 				Formula: to.Ptr("$TargetDedicatedNodes=1"),
	// 			},
	// 		},
	// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 		},
	// 		TaskSlotsPerNode: to.Ptr[int32](1),
	// 		VMSize: to.Ptr("STANDARD_D4"),
	// 	},
	// }
}
Output:

Example (CreatePoolVirtualMachineConfigurationExtensions)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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{
				VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
					ImageReference: &armbatch.ImageReference{
						Offer:     to.Ptr("0001-com-ubuntu-server-focal"),
						Publisher: to.Ptr("Canonical"),
						SKU:       to.Ptr("20_04-lts"),
					},
					NodeAgentSKUID: to.Ptr("batch.node.ubuntu 20.04"),
					Extensions: []*armbatch.VMExtension{
						{
							Name:                    to.Ptr("batchextension1"),
							Type:                    to.Ptr("SecurityMonitoringForLinux"),
							AutoUpgradeMinorVersion: to.Ptr(true),
							ProtectedSettings: map[string]any{
								"protectedSettingsKey": "protectedSettingsValue",
							},
							Publisher: to.Ptr("Microsoft.Azure.Security.Monitoring"),
							Settings: map[string]any{
								"settingsKey": "settingsValue",
							},
							TypeHandlerVersion: to.Ptr("1.0"),
						}},
				},
			},
			ScaleSettings: &armbatch.ScaleSettings{
				AutoScale: &armbatch.AutoScaleSettings{
					EvaluationInterval: to.Ptr("PT5M"),
					Formula:            to.Ptr("$TargetDedicatedNodes=1"),
				},
			},
			TargetNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeDefault),
			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.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); 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-focal"),
	// 					Publisher: to.Ptr("Canonical"),
	// 					SKU: to.Ptr("20_04-lts"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 20.04"),
	// 				Extensions: []*armbatch.VMExtension{
	// 					{
	// 						Name: to.Ptr("batchextension1"),
	// 						Type: to.Ptr("SecurityMonitoringForLinux"),
	// 						AutoUpgradeMinorVersion: to.Ptr(true),
	// 						Publisher: to.Ptr("Microsoft.Azure.Security.Monitoring"),
	// 						Settings: map[string]any{
	// 							"settingsKey": "settingsValue",
	// 						},
	// 						TypeHandlerVersion: to.Ptr("1.0"),
	// 				}},
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			AutoScale: &armbatch.AutoScaleSettings{
	// 				EvaluationInterval: to.Ptr("PT5M"),
	// 				Formula: to.Ptr("$TargetDedicatedNodes=1"),
	// 			},
	// 		},
	// 		TargetNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeDefault),
	// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 		},
	// 		TaskSlotsPerNode: to.Ptr[int32](1),
	// 		VMSize: to.Ptr("STANDARD_D4"),
	// 	},
	// }
}
Output:

func (*PoolClient) DisableAutoScale

func (client *PoolClient) DisableAutoScale(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolClientDisableAutoScaleOptions) (PoolClientDisableAutoScaleResponse, error)

DisableAutoScale - Disables automatic scaling for a pool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - PoolClientDisableAutoScaleOptions contains the optional parameters for the PoolClient.DisableAutoScale method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolDisableAutoScale.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().DisableAutoScale(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pool = armbatch.Pool{
	// 	Name: to.Ptr("testpool"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
	// 	Etag: to.Ptr("W/\"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.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				ImageReference: &armbatch.ImageReference{
	// 					Offer: to.Ptr("UbuntuServer"),
	// 					Publisher: to.Ptr("Canonical"),
	// 					SKU: to.Ptr("18.04-LTS"),
	// 					Version: to.Ptr("latest"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		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"),
	// 	},
	// }
}
Output:

func (*PoolClient) Get

func (client *PoolClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolClientGetOptions) (PoolClientGetResponse, error)

Get - Gets information about the specified pool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - PoolClientGetOptions contains the optional parameters for the PoolClient.Get method.
Example (GetPool)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pool = armbatch.Pool{
	// 	Name: to.Ptr("testpool"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
	// 	Etag: to.Ptr("W/\"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.9407275Z"); 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.9407275Z"); 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.9407275Z"); 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{
	// 					EndpointConfiguration: &armbatch.PoolEndpointConfiguration{
	// 						InboundNatPools: []*armbatch.InboundNatPool{
	// 							{
	// 								Name: to.Ptr("testnat"),
	// 								BackendPort: to.Ptr[int32](12001),
	// 								FrontendPortRangeEnd: to.Ptr[int32](15100),
	// 								FrontendPortRangeStart: to.Ptr[int32](15000),
	// 								NetworkSecurityGroupRules: []*armbatch.NetworkSecurityGroupRule{
	// 									{
	// 										Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessAllow),
	// 										Priority: to.Ptr[int32](150),
	// 										SourceAddressPrefix: to.Ptr("192.100.12.45"),
	// 										SourcePortRanges: []*string{
	// 											to.Ptr("123"),
	// 											to.Ptr("22")},
	// 										},
	// 										{
	// 											Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessDeny),
	// 											Priority: to.Ptr[int32](3500),
	// 											SourceAddressPrefix: to.Ptr("*"),
	// 											SourcePortRanges: []*string{
	// 												to.Ptr("*")},
	// 										}},
	// 										Protocol: to.Ptr(armbatch.InboundEndpointProtocolTCP),
	// 								}},
	// 							},
	// 							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.9407275Z"); return t}()),
	// 						ResizeOperationStatus: &armbatch.ResizeOperationStatus{
	// 							NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
	// 							ResizeTimeout: to.Ptr("PT8M"),
	// 							StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 							TargetDedicatedNodes: to.Ptr[int32](6),
	// 							TargetLowPriorityNodes: to.Ptr[int32](28),
	// 						},
	// 						ScaleSettings: &armbatch.ScaleSettings{
	// 							FixedScale: &armbatch.FixedScaleSettings{
	// 								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"),
	// 					},
	// 				}
}
Output:

Example (GetPoolVirtualMachineConfigurationExtensions)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pool = armbatch.Pool{
	// 	Name: to.Ptr("testpool"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
	// 	Etag: to.Ptr("W/\"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.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				ImageReference: &armbatch.ImageReference{
	// 					Offer: to.Ptr("0001-com-ubuntu-server-focal"),
	// 					Publisher: to.Ptr("Canonical"),
	// 					SKU: to.Ptr("20_04-lts"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 20.04"),
	// 				Extensions: []*armbatch.VMExtension{
	// 					{
	// 						Name: to.Ptr("batchextension1"),
	// 						Type: to.Ptr("SecurityMonitoringForLinux"),
	// 						AutoUpgradeMinorVersion: to.Ptr(true),
	// 						Publisher: to.Ptr("Microsoft.Azure.Security.Monitoring"),
	// 						Settings: map[string]any{
	// 							"settingsKey": "settingsValue",
	// 						},
	// 						TypeHandlerVersion: to.Ptr("1.0"),
	// 				}},
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateEnabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
	// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
	// 			ResizeTimeout: to.Ptr("PT8M"),
	// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 			TargetDedicatedNodes: to.Ptr[int32](6),
	// 			TargetLowPriorityNodes: to.Ptr[int32](28),
	// 		},
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			FixedScale: &armbatch.FixedScaleSettings{
	// 				ResizeTimeout: to.Ptr("PT8M"),
	// 				TargetDedicatedNodes: to.Ptr[int32](6),
	// 				TargetLowPriorityNodes: to.Ptr[int32](28),
	// 			},
	// 		},
	// 		TargetNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeDefault),
	// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypePack),
	// 		},
	// 		TaskSlotsPerNode: to.Ptr[int32](13),
	// 		VMSize: to.Ptr("STANDARD_D4"),
	// 	},
	// }
}
Output:

func (*PoolClient) NewListByBatchAccountPager added in v0.4.0

func (client *PoolClient) NewListByBatchAccountPager(resourceGroupName string, accountName string, options *PoolClientListByBatchAccountOptions) *runtime.Pager[PoolClientListByBatchAccountResponse]

NewListByBatchAccountPager - Lists all of the pools in the specified account.

Generated from API version 2022-10-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 method.
Example (ListPool)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPoolClient().NewListByBatchAccountPager("default-azurebatch-japaneast", "sampleacct", &armbatch.PoolClientListByBatchAccountOptions{Maxresults: nil,
		Select: 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.ListPoolsResult = armbatch.ListPoolsResult{
		// 	Value: []*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.AllocationStateSteady),
		// 				AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); 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.9407275Z"); 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.9407275Z"); 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{
		// 							EndpointConfiguration: &armbatch.PoolEndpointConfiguration{
		// 								InboundNatPools: []*armbatch.InboundNatPool{
		// 									{
		// 										Name: to.Ptr("testnat"),
		// 										BackendPort: to.Ptr[int32](12001),
		// 										FrontendPortRangeEnd: to.Ptr[int32](15100),
		// 										FrontendPortRangeStart: to.Ptr[int32](15000),
		// 										NetworkSecurityGroupRules: []*armbatch.NetworkSecurityGroupRule{
		// 											{
		// 												Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessAllow),
		// 												Priority: to.Ptr[int32](150),
		// 												SourceAddressPrefix: to.Ptr("192.100.12.45"),
		// 												SourcePortRanges: []*string{
		// 													to.Ptr("*")},
		// 												},
		// 												{
		// 													Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessDeny),
		// 													Priority: to.Ptr[int32](3500),
		// 													SourceAddressPrefix: to.Ptr("*"),
		// 													SourcePortRanges: []*string{
		// 														to.Ptr("*")},
		// 												}},
		// 												Protocol: to.Ptr(armbatch.InboundEndpointProtocolTCP),
		// 										}},
		// 									},
		// 									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.9407275Z"); return t}()),
		// 								ResizeOperationStatus: &armbatch.ResizeOperationStatus{
		// 									Errors: []*armbatch.ResizeError{
		// 										{
		// 											Code: to.Ptr("AllocationTimedout"),
		// 											Message: to.Ptr("Desired number of dedicated nodes could not be allocated as the resize timeout was reached"),
		// 									}},
		// 									NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
		// 									ResizeTimeout: to.Ptr("PT8M"),
		// 									StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
		// 									TargetDedicatedNodes: to.Ptr[int32](6),
		// 									TargetLowPriorityNodes: to.Ptr[int32](28),
		// 								},
		// 								ScaleSettings: &armbatch.ScaleSettings{
		// 									FixedScale: &armbatch.FixedScaleSettings{
		// 										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"),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

Example (ListPoolWithFilter)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolListWithFilter.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPoolClient().NewListByBatchAccountPager("default-azurebatch-japaneast", "sampleacct", &armbatch.PoolClientListByBatchAccountOptions{Maxresults: nil,
		Select: to.Ptr("properties/allocationState,properties/provisioningStateTransitionTime,properties/currentDedicatedNodes,properties/currentLowPriorityNodes"),
		Filter: to.Ptr("startswith(name, 'po') or (properties/allocationState eq 'Steady' and properties/provisioningStateTransitionTime lt datetime'2017-02-02')"),
	})
	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.ListPoolsResult = armbatch.ListPoolsResult{
		// 	Value: []*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.AllocationStateSteady),
		// 				CurrentDedicatedNodes: to.Ptr[int32](0),
		// 				CurrentLowPriorityNodes: to.Ptr[int32](2),
		// 				ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("pooltest"),
		// 			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/pooltest"),
		// 			Properties: &armbatch.PoolProperties{
		// 				AllocationState: to.Ptr(armbatch.AllocationStateResizing),
		// 				CurrentDedicatedNodes: to.Ptr[int32](4),
		// 				CurrentLowPriorityNodes: to.Ptr[int32](0),
		// 				ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-26T10:22:55.9407275Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*PoolClient) StopResize

func (client *PoolClient) StopResize(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolClientStopResizeOptions) (PoolClientStopResizeResponse, error)

StopResize - This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes first to stopping and then to steady. A resize operation need 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 2022-10-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.
  • options - PoolClientStopResizeOptions contains the optional parameters for the PoolClient.StopResize method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolStopResize.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().StopResize(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Pool = armbatch.Pool{
	// 	Name: to.Ptr("testpool"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
	// 	Etag: to.Ptr("W/\"0x8D4EDFEBFADF4AB\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
	// 	Properties: &armbatch.PoolProperties{
	// 		AllocationState: to.Ptr(armbatch.AllocationStateSteady),
	// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](0),
	// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 				ImageReference: &armbatch.ImageReference{
	// 					Offer: to.Ptr("UbuntuServer"),
	// 					Publisher: to.Ptr("Canonical"),
	// 					SKU: to.Ptr("18.04-LTS"),
	// 					Version: to.Ptr("latest"),
	// 				},
	// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
	// 			},
	// 		},
	// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
	// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
	// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
	// 			ResizeTimeout: to.Ptr("PT10M"),
	// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 			TargetDedicatedNodes: to.Ptr[int32](1),
	// 		},
	// 		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"),
	// 	},
	// }
}
Output:

func (*PoolClient) Update

func (client *PoolClient) Update(ctx context.Context, resourceGroupName string, accountName string, poolName string, parameters Pool, options *PoolClientUpdateOptions) (PoolClientUpdateResponse, error)

Update - Updates the properties of an existing pool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • parameters - Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged.
  • options - PoolClientUpdateOptions contains the optional parameters for the PoolClient.Update method.
Example (UpdatePoolEnableAutoscale)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_EnableAutoScale.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().Update(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
		Properties: &armbatch.PoolProperties{
			ScaleSettings: &armbatch.ScaleSettings{
				AutoScale: &armbatch.AutoScaleSettings{
					Formula: to.Ptr("$TargetDedicatedNodes=34"),
				},
			},
		},
	}, &armbatch.PoolClientUpdateOptions{IfMatch: 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-29T10:22:55.9407275Z"); return t}()),
	// 		AutoScaleRun: &armbatch.AutoScaleRun{
	// 			EvaluationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.9407275Z"); return t}()),
	// 			Results: to.Ptr("$TargetDedicatedNodes=34;NodeDeallocationOption=requeue"),
	// 		},
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](12),
	// 		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-29T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); 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-29T10:22:55.9407275Z"); return t}()),
	// 			TargetDedicatedNodes: to.Ptr[int32](34),
	// 		},
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			AutoScale: &armbatch.AutoScaleSettings{
	// 				EvaluationInterval: to.Ptr("PT15M"),
	// 				Formula: to.Ptr("$TargetDedicated=34"),
	// 			},
	// 		},
	// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 		},
	// 		TaskSlotsPerNode: to.Ptr[int32](1),
	// 		VMSize: to.Ptr("STANDARD_D4"),
	// 	},
	// }
}
Output:

Example (UpdatePoolOtherProperties)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_OtherProperties.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().Update(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
		Properties: &armbatch.PoolProperties{
			ApplicationPackages: []*armbatch.ApplicationPackageReference{
				{
					ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"),
				},
				{
					ID:      to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_5678"),
					Version: to.Ptr("1.0"),
				}},
			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"),
				}},
			Metadata: []*armbatch.MetadataItem{
				{
					Name:  to.Ptr("key1"),
					Value: to.Ptr("value1"),
				}},
			TargetNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeSimplified),
		},
	}, &armbatch.PoolClientUpdateOptions{IfMatch: 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-29T10:22:55.9407275Z"); return t}()),
	// 		ApplicationPackages: []*armbatch.ApplicationPackageReference{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"),
	// 			},
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_5678"),
	// 				Version: to.Ptr("1.0"),
	// 		}},
	// 		AutoScaleRun: &armbatch.AutoScaleRun{
	// 			EvaluationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.9407275Z"); return t}()),
	// 			Results: to.Ptr("$TargetDedicatedNodes=34;NodeDeallocationOption=requeue"),
	// 		},
	// 		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.CertificateVisibilityStartTask),
	// 					to.Ptr(armbatch.CertificateVisibilityTask),
	// 					to.Ptr(armbatch.CertificateVisibilityRemoteUser)},
	// 			}},
	// 			CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 			CurrentDedicatedNodes: to.Ptr[int32](12),
	// 			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-29T10:22:55.9407275Z"); return t}()),
	// 			Metadata: []*armbatch.MetadataItem{
	// 				{
	// 					Name: to.Ptr("key1"),
	// 					Value: to.Ptr("value1"),
	// 			}},
	// 			ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 			ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 			ResizeOperationStatus: &armbatch.ResizeOperationStatus{
	// 				NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
	// 				ResizeTimeout: to.Ptr("PT8M"),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.9407275Z"); return t}()),
	// 				TargetDedicatedNodes: to.Ptr[int32](8),
	// 			},
	// 			ScaleSettings: &armbatch.ScaleSettings{
	// 				FixedScale: &armbatch.FixedScaleSettings{
	// 					NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
	// 					ResizeTimeout: to.Ptr("PT8M"),
	// 					TargetDedicatedNodes: to.Ptr[int32](1),
	// 					TargetLowPriorityNodes: to.Ptr[int32](0),
	// 				},
	// 			},
	// 			TargetNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeSimplified),
	// 			TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 				NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 			},
	// 			TaskSlotsPerNode: to.Ptr[int32](1),
	// 			VMSize: to.Ptr("STANDARD_D4"),
	// 		},
	// 	}
}
Output:

Example (UpdatePoolRemoveStartTask)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_RemoveStartTask.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().Update(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
		Properties: &armbatch.PoolProperties{
			StartTask: &armbatch.StartTask{},
		},
	}, &armbatch.PoolClientUpdateOptions{IfMatch: 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-29T10:22:55.9407275Z"); return t}()),
	// 		AutoScaleRun: &armbatch.AutoScaleRun{
	// 			EvaluationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.9407275Z"); return t}()),
	// 			Results: to.Ptr("$TargetDedicatedNodes=34;NodeDeallocationOption=requeue"),
	// 		},
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](12),
	// 		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-29T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); 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-29T10:22:55.9407275Z"); return t}()),
	// 			TargetDedicatedNodes: to.Ptr[int32](34),
	// 		},
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			AutoScale: &armbatch.AutoScaleSettings{
	// 				EvaluationInterval: to.Ptr("PT15M"),
	// 				Formula: to.Ptr("$TargetDedicated=34"),
	// 			},
	// 		},
	// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
	// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
	// 		},
	// 		TaskSlotsPerNode: to.Ptr[int32](1),
	// 		VMSize: to.Ptr("STANDARD_D4"),
	// 	},
	// }
}
Output:

Example (UpdatePoolResizePool)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_ResizePool.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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().Update(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
		Properties: &armbatch.PoolProperties{
			ScaleSettings: &armbatch.ScaleSettings{
				FixedScale: &armbatch.FixedScaleSettings{
					NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
					ResizeTimeout:          to.Ptr("PT8M"),
					TargetDedicatedNodes:   to.Ptr[int32](5),
					TargetLowPriorityNodes: to.Ptr[int32](0),
				},
			},
		},
	}, &armbatch.PoolClientUpdateOptions{IfMatch: 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-29T10:22:55.9407275Z"); return t}()),
	// 		AutoScaleRun: &armbatch.AutoScaleRun{
	// 			EvaluationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.9407275Z"); return t}()),
	// 			Results: to.Ptr("$TargetDedicatedNodes=34;NodeDeallocationOption=requeue"),
	// 		},
	// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		CurrentDedicatedNodes: to.Ptr[int32](12),
	// 		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-29T10:22:55.9407275Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
	// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
	// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
	// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
	// 			ResizeTimeout: to.Ptr("PT8M"),
	// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.9407275Z"); return t}()),
	// 			TargetDedicatedNodes: to.Ptr[int32](8),
	// 		},
	// 		ScaleSettings: &armbatch.ScaleSettings{
	// 			FixedScale: &armbatch.FixedScaleSettings{
	// 				NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
	// 				ResizeTimeout: to.Ptr("PT8M"),
	// 				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_D4"),
	// 	},
	// }
}
Output:

type PoolClientBeginDeleteOptions added in v0.2.0

type PoolClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PoolClientBeginDeleteOptions contains the optional parameters for the PoolClient.BeginDelete method.

type PoolClientCreateOptions added in v0.2.0

type PoolClientCreateOptions struct {
	// The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool
	// already exists. If omitted, this operation will always be applied.
	IfMatch *string
	// Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored.
	IfNoneMatch *string
}

PoolClientCreateOptions contains the optional parameters for the PoolClient.Create method.

type PoolClientCreateResponse added in v0.2.0

type PoolClientCreateResponse struct {
	Pool
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientCreateResponse contains the response from method PoolClient.Create.

type PoolClientDeleteResponse added in v0.2.0

type PoolClientDeleteResponse struct {
}

PoolClientDeleteResponse contains the response from method PoolClient.BeginDelete.

type PoolClientDisableAutoScaleOptions added in v0.2.0

type PoolClientDisableAutoScaleOptions struct {
}

PoolClientDisableAutoScaleOptions contains the optional parameters for the PoolClient.DisableAutoScale method.

type PoolClientDisableAutoScaleResponse added in v0.2.0

type PoolClientDisableAutoScaleResponse struct {
	Pool
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientDisableAutoScaleResponse contains the response from method PoolClient.DisableAutoScale.

type PoolClientGetOptions added in v0.2.0

type PoolClientGetOptions struct {
}

PoolClientGetOptions contains the optional parameters for the PoolClient.Get method.

type PoolClientGetResponse added in v0.2.0

type PoolClientGetResponse struct {
	Pool
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientGetResponse contains the response from method PoolClient.Get.

type PoolClientListByBatchAccountOptions added in v0.2.0

type PoolClientListByBatchAccountOptions struct {
	// OData filter expression. Valid properties for filtering are:
	// name properties/allocationState properties/allocationStateTransitionTime properties/creationTime properties/provisioningState
	// properties/provisioningStateTransitionTime properties/lastModified
	// properties/vmSize properties/interNodeCommunication properties/scaleSettings/autoScale properties/scaleSettings/fixedScale
	Filter *string
	// The maximum number of items to return in the response.
	Maxresults *int32
	// Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties
	// under properties/ are valid for selection.
	Select *string
}

PoolClientListByBatchAccountOptions contains the optional parameters for the PoolClient.NewListByBatchAccountPager method.

type PoolClientListByBatchAccountResponse added in v0.2.0

type PoolClientListByBatchAccountResponse struct {
	ListPoolsResult
}

PoolClientListByBatchAccountResponse contains the response from method PoolClient.NewListByBatchAccountPager.

type PoolClientStopResizeOptions added in v0.2.0

type PoolClientStopResizeOptions struct {
}

PoolClientStopResizeOptions contains the optional parameters for the PoolClient.StopResize method.

type PoolClientStopResizeResponse added in v0.2.0

type PoolClientStopResizeResponse struct {
	Pool
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientStopResizeResponse contains the response from method PoolClient.StopResize.

type PoolClientUpdateOptions added in v0.2.0

type PoolClientUpdateOptions struct {
	// The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally.
	IfMatch *string
}

PoolClientUpdateOptions contains the optional parameters for the PoolClient.Update method.

type PoolClientUpdateResponse added in v0.2.0

type PoolClientUpdateResponse struct {
	Pool
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientUpdateResponse contains the response from method PoolClient.Update.

type PoolEndpointConfiguration

type PoolEndpointConfiguration struct {
	// REQUIRED; The maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is exceeded
	// the request fails with HTTP status code 400. This cannot be specified if the
	// IPAddressProvisioningType is NoPublicIPAddresses.
	InboundNatPools []*InboundNatPool
}

PoolEndpointConfiguration - The endpoint configuration for a pool.

func (PoolEndpointConfiguration) MarshalJSON

func (p PoolEndpointConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PoolEndpointConfiguration.

func (*PoolEndpointConfiguration) UnmarshalJSON added in v1.1.0

func (p *PoolEndpointConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PoolEndpointConfiguration.

type PoolIdentity added in v0.2.0

type PoolIdentity struct {
	// REQUIRED; The type of identity used for the Batch Pool.
	Type *PoolIdentityType

	// The list of user identities associated with the Batch pool.
	UserAssignedIdentities map[string]*UserAssignedIdentities
}

PoolIdentity - The identity of the Batch pool, if configured. If the pool identity is updated during update an existing pool, only the new vms which are created after the pool shrinks to 0 will have the updated identities

func (PoolIdentity) MarshalJSON added in v0.2.0

func (p PoolIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PoolIdentity.

func (*PoolIdentity) UnmarshalJSON added in v1.1.0

func (p *PoolIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PoolIdentity.

type PoolIdentityType

type PoolIdentityType string

PoolIdentityType - The type of identity used for the Batch Pool.

const (
	// PoolIdentityTypeUserAssigned - Batch pool has user assigned identities with it.
	PoolIdentityTypeUserAssigned PoolIdentityType = "UserAssigned"
	// PoolIdentityTypeNone - Batch pool has no identity associated with it. Setting `None` in update pool will remove existing
	// identities.
	PoolIdentityTypeNone PoolIdentityType = "None"
)

func PossiblePoolIdentityTypeValues

func PossiblePoolIdentityTypeValues() []PoolIdentityType

PossiblePoolIdentityTypeValues returns the possible values for the PoolIdentityType const type.

type PoolProperties

type PoolProperties struct {
	// The list of application licenses must be a subset of available Batch service application licenses. If a license is requested
	// which is not supported, pool creation will fail.
	ApplicationLicenses []*string

	// Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes
	// that are already in the pool until they are rebooted or reimaged. There is a
	// maximum of 10 application package references on any given pool.
	ApplicationPackages []*ApplicationPackageReference

	// For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location.
	// 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.
	// Warning: This property is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension
	// [https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide]
	// instead.
	Certificates []*CertificateReference

	// Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration
	// uses Azure Virtual Machines (IaaS).
	DeploymentConfiguration *DeploymentConfiguration

	// The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
	DisplayName *string

	// This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the
	// requested number of nodes to be allocated in the pool. If not specified, this
	// value defaults to 'Disabled'.
	InterNodeCommunication *InterNodeCommunicationState

	// The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
	Metadata []*MetadataItem

	// This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.
	MountConfiguration []*MountConfiguration

	// The network configuration for a pool.
	NetworkConfiguration *NetworkConfiguration

	// Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified,
	// or 'autoScale' which defines a formula which is periodically reevaluated.
	// If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.
	ScaleSettings *ScaleSettings

	// In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.
	StartTask *StartTask

	// If omitted, the default value is Default.
	TargetNodeCommunicationMode *NodeCommunicationMode

	// If not specified, the default is spread.
	TaskSchedulingPolicy *TaskSchedulingPolicy

	// The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.
	TaskSlotsPerNode *int32

	// 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).
	VMSize *string

	// READ-ONLY; Whether the pool is resizing.
	AllocationState *AllocationState

	// READ-ONLY; The time at which the pool entered its current allocation state.
	AllocationStateTransitionTime *time.Time

	// READ-ONLY; This property is set only if the pool automatically scales, i.e. autoScaleSettings are used.
	AutoScaleRun *AutoScaleRun

	// READ-ONLY; The creation time of the pool.
	CreationTime *time.Time

	// READ-ONLY; The number of dedicated compute nodes currently in the pool.
	CurrentDedicatedNodes *int32

	// READ-ONLY; The number of Spot/low-priority compute nodes currently in the pool.
	CurrentLowPriorityNodes *int32

	// READ-ONLY; Determines how a pool communicates with the Batch service.
	CurrentNodeCommunicationMode *NodeCommunicationMode

	// READ-ONLY; This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed.
	// It does not factor in node-level changes such as a compute node changing state.
	LastModified *time.Time

	// READ-ONLY; The current state of the pool.
	ProvisioningState *PoolProvisioningState

	// READ-ONLY; The time at which the pool entered its current state.
	ProvisioningStateTransitionTime *time.Time

	// READ-ONLY; Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed
	// operation (if the AllocationState is Steady).
	ResizeOperationStatus *ResizeOperationStatus
}

PoolProperties - Pool properties.

func (PoolProperties) MarshalJSON

func (p PoolProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PoolProperties.

func (*PoolProperties) UnmarshalJSON

func (p *PoolProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PoolProperties.

type PoolProvisioningState

type PoolProvisioningState string

PoolProvisioningState - The current state of the pool.

const (
	// PoolProvisioningStateSucceeded - The pool is available to run tasks subject to the availability of compute nodes.
	PoolProvisioningStateSucceeded PoolProvisioningState = "Succeeded"
	// PoolProvisioningStateDeleting - The user has requested that the pool be deleted, but the delete operation has not yet completed.
	PoolProvisioningStateDeleting PoolProvisioningState = "Deleting"
)

func PossiblePoolProvisioningStateValues

func PossiblePoolProvisioningStateValues() []PoolProvisioningState

PossiblePoolProvisioningStateValues returns the possible values for the PoolProvisioningState const type.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM resource identifier of the private endpoint. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}.
	ID *string
}

PrivateEndpoint - The private endpoint of the private endpoint connection.

func (PrivateEndpoint) MarshalJSON added in v1.1.0

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// The properties associated with the private endpoint connection.
	Properties *PrivateEndpointConnectionProperties

	// 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
}

PrivateEndpointConnection - Contains information about a private link resource.

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionClient

type PrivateEndpointConnectionClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionClient contains the methods for the PrivateEndpointConnection group. Don't use this type directly, use NewPrivateEndpointConnectionClient() instead.

func NewPrivateEndpointConnectionClient

func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionClient, error)

NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient 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 (*PrivateEndpointConnectionClient) BeginDelete added in v1.1.0

func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error)

BeginDelete - Deletes the specified private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPrivateEndpointConnectionClient().BeginDelete(ctx, "default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", 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)
	}
}
Output:

func (*PrivateEndpointConnectionClient) BeginUpdate

func (client *PrivateEndpointConnectionClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionClientBeginUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionClientUpdateResponse], error)

BeginUpdate - Updates the properties of an existing private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • parameters - PrivateEndpointConnection properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged.
  • options - PrivateEndpointConnectionClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPrivateEndpointConnectionClient().BeginUpdate(ctx, "default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", armbatch.PrivateEndpointConnection{
		Properties: &armbatch.PrivateEndpointConnectionProperties{
			PrivateLinkServiceConnectionState: &armbatch.PrivateLinkServiceConnectionState{
				Description: to.Ptr("Approved by xyz.abc@company.com"),
				Status:      to.Ptr(armbatch.PrivateLinkServiceConnectionStatusApproved),
			},
		},
	}, &armbatch.PrivateEndpointConnectionClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armbatch.PrivateEndpointConnection{
	// 	Name: to.Ptr("testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnections"),
	// 	Etag: to.Ptr("W/\"0x8D4EDFEBFADF4AB\""),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/privateEndpointConnections/testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0"),
	// 	Properties: &armbatch.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("batchAccount")},
	// 			PrivateEndpoint: &armbatch.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Network/privateEndpoints/testprivateEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armbatch.PrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("Approved by xyz.abc@company.com"),
	// 				Status: to.Ptr(armbatch.PrivateLinkServiceConnectionStatusApproved),
	// 			},
	// 			ProvisioningState: to.Ptr(armbatch.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionClient) Get

func (client *PrivateEndpointConnectionClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetOptions) (PrivateEndpointConnectionClientGetResponse, error)

Get - Gets information about the specified private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPrivateEndpointConnectionClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", 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.PrivateEndpointConnection = armbatch.PrivateEndpointConnection{
	// 	Name: to.Ptr("testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/privateEndpointConnections/testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0"),
	// 	Properties: &armbatch.PrivateEndpointConnectionProperties{
	// 		GroupIDs: []*string{
	// 			to.Ptr("batchAccount")},
	// 			PrivateEndpoint: &armbatch.PrivateEndpoint{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Network/privateEndpoints/testprivateEndpoint"),
	// 			},
	// 			PrivateLinkServiceConnectionState: &armbatch.PrivateLinkServiceConnectionState{
	// 				Description: to.Ptr("Approved by xyz.abc@company.com"),
	// 				Status: to.Ptr(armbatch.PrivateLinkServiceConnectionStatusApproved),
	// 			},
	// 			ProvisioningState: to.Ptr(armbatch.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*PrivateEndpointConnectionClient) NewListByBatchAccountPager added in v0.4.0

NewListByBatchAccountPager - Lists all of the private endpoint connections in the specified account.

Generated from API version 2022-10-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 method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPrivateEndpointConnectionClient().NewListByBatchAccountPager("default-azurebatch-japaneast", "sampleacct", &armbatch.PrivateEndpointConnectionClientListByBatchAccountOptions{Maxresults: 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.ListPrivateEndpointConnectionsResult = armbatch.ListPrivateEndpointConnectionsResult{
		// 	Value: []*armbatch.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("testprivateEndpointConnection"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/privateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/privateEndpointConnections/testprivateEndpointConnection"),
		// 			Properties: &armbatch.PrivateEndpointConnectionProperties{
		// 				GroupIDs: []*string{
		// 					to.Ptr("batchAccount")},
		// 					PrivateEndpoint: &armbatch.PrivateEndpoint{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Network/privateEndpoints/testprivateEndpoint"),
		// 					},
		// 					PrivateLinkServiceConnectionState: &armbatch.PrivateLinkServiceConnectionState{
		// 						Description: to.Ptr("Approved by xyz.abc@company.com"),
		// 						Status: to.Ptr(armbatch.PrivateLinkServiceConnectionStatusApproved),
		// 					},
		// 					ProvisioningState: to.Ptr(armbatch.PrivateEndpointConnectionProvisioningStateSucceeded),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type PrivateEndpointConnectionClientBeginDeleteOptions added in v1.1.0

type PrivateEndpointConnectionClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete method.

type PrivateEndpointConnectionClientBeginUpdateOptions added in v0.2.0

type PrivateEndpointConnectionClientBeginUpdateOptions struct {
	// The state (ETag) version of the private endpoint connection to update. This value can be omitted or set to "*" to apply
	// the operation unconditionally.
	IfMatch *string
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginUpdate method.

type PrivateEndpointConnectionClientDeleteResponse added in v1.1.0

type PrivateEndpointConnectionClientDeleteResponse struct {
}

PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.BeginDelete.

type PrivateEndpointConnectionClientGetOptions added in v0.2.0

type PrivateEndpointConnectionClientGetOptions struct {
}

PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get method.

type PrivateEndpointConnectionClientGetResponse added in v0.2.0

type PrivateEndpointConnectionClientGetResponse struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionClientGetResponse contains the response from method PrivateEndpointConnectionClient.Get.

type PrivateEndpointConnectionClientListByBatchAccountOptions added in v0.2.0

type PrivateEndpointConnectionClientListByBatchAccountOptions struct {
	// The maximum number of items to return in the response.
	Maxresults *int32
}

PrivateEndpointConnectionClientListByBatchAccountOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByBatchAccountPager method.

type PrivateEndpointConnectionClientListByBatchAccountResponse added in v0.2.0

type PrivateEndpointConnectionClientListByBatchAccountResponse struct {
	ListPrivateEndpointConnectionsResult
}

PrivateEndpointConnectionClientListByBatchAccountResponse contains the response from method PrivateEndpointConnectionClient.NewListByBatchAccountPager.

type PrivateEndpointConnectionClientUpdateResponse added in v0.2.0

type PrivateEndpointConnectionClientUpdateResponse struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionClientUpdateResponse contains the response from method PrivateEndpointConnectionClient.BeginUpdate.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// The private link service connection state of the private endpoint connection
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// READ-ONLY; The value has one and only one group id.
	GroupIDs []*string

	// READ-ONLY; The private endpoint of the private endpoint connection.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; The provisioning state of the private endpoint connection.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Private endpoint connection properties.

func (PrivateEndpointConnectionProperties) MarshalJSON added in v1.1.0

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The provisioning state of the private endpoint connection.

const (
	// PrivateEndpointConnectionProvisioningStateCreating - The connection is creating.
	PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating"
	// PrivateEndpointConnectionProvisioningStateUpdating - The user has requested that the connection status be updated, but
	// the update operation has not yet completed. You may not reference the connection when connecting the Batch account.
	PrivateEndpointConnectionProvisioningStateUpdating PrivateEndpointConnectionProvisioningState = "Updating"
	// PrivateEndpointConnectionProvisioningStateDeleting - The connection is deleting.
	PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting"
	// PrivateEndpointConnectionProvisioningStateSucceeded - The connection status is final and is ready for use if Status is
	// Approved.
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
	// PrivateEndpointConnectionProvisioningStateFailed - The user requested that the connection be updated and it failed. You
	// may retry the update operation.
	PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed"
	// PrivateEndpointConnectionProvisioningStateCancelled - The user has cancelled the connection creation.
	PrivateEndpointConnectionProvisioningStateCancelled PrivateEndpointConnectionProvisioningState = "Cancelled"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// The properties associated with the private link resource.
	Properties *PrivateLinkResourceProperties

	// 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
}

PrivateLinkResource - Contains information about a private link resource.

func (PrivateLinkResource) MarshalJSON

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceClient

type PrivateLinkResourceClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourceClient contains the methods for the PrivateLinkResource group. Don't use this type directly, use NewPrivateLinkResourceClient() instead.

func NewPrivateLinkResourceClient

func NewPrivateLinkResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourceClient, error)

NewPrivateLinkResourceClient creates a new instance of PrivateLinkResourceClient 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 (*PrivateLinkResourceClient) Get

func (client *PrivateLinkResourceClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateLinkResourceName string, options *PrivateLinkResourceClientGetOptions) (PrivateLinkResourceClientGetResponse, error)

Get - Gets information about the specified private link resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-10-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.
  • options - PrivateLinkResourceClientGetOptions contains the optional parameters for the PrivateLinkResourceClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateLinkResourceGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPrivateLinkResourceClient().Get(ctx, "default-azurebatch-japaneast", "sampleacct", "batchAccount", 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.PrivateLinkResource = armbatch.PrivateLinkResource{
	// 	Name: to.Ptr("sampleacct"),
	// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/privateLinkResources"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/privateLinkResources/batchAccount"),
	// 	Properties: &armbatch.PrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("batchAccount"),
	// 		RequiredMembers: []*string{
	// 			to.Ptr("batchAccount")},
	// 			RequiredZoneNames: []*string{
	// 				to.Ptr("privatelink.japaneast.batch.azure.com")},
	// 			},
	// 		}
}
Output:

func (*PrivateLinkResourceClient) NewListByBatchAccountPager added in v0.4.0

NewListByBatchAccountPager - Lists all of the private link resources in the specified account.

Generated from API version 2022-10-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 method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ef6f2f06858cdbec7684968e1a54c7610da97dbb/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateLinkResourcesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

func main() {
	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.NewPrivateLinkResourceClient().NewListByBatchAccountPager("default-azurebatch-japaneast", "sampleacct", &armbatch.PrivateLinkResourceClientListByBatchAccountOptions{Maxresults: 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.ListPrivateLinkResourcesResult = armbatch.ListPrivateLinkResourcesResult{
		// 	Value: []*armbatch.PrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("batchAccount"),
		// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/privateLinkResources"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/privateLinkResources/batchAccount"),
		// 			Properties: &armbatch.PrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("batchAccount"),
		// 				RequiredMembers: []*string{
		// 					to.Ptr("batchAccount")},
		// 					RequiredZoneNames: []*string{
		// 						to.Ptr("privatelink.japaneast.batch.azure.com")},
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type PrivateLinkResourceClientGetOptions added in v0.2.0

type PrivateLinkResourceClientGetOptions struct {
}

PrivateLinkResourceClientGetOptions contains the optional parameters for the PrivateLinkResourceClient.Get method.

type PrivateLinkResourceClientGetResponse added in v0.2.0

type PrivateLinkResourceClientGetResponse struct {
	PrivateLinkResource
}

PrivateLinkResourceClientGetResponse contains the response from method PrivateLinkResourceClient.Get.

type PrivateLinkResourceClientListByBatchAccountOptions added in v0.2.0

type PrivateLinkResourceClientListByBatchAccountOptions struct {
	// The maximum number of items to return in the response.
	Maxresults *int32
}

PrivateLinkResourceClientListByBatchAccountOptions contains the optional parameters for the PrivateLinkResourceClient.NewListByBatchAccountPager method.

type PrivateLinkResourceClientListByBatchAccountResponse added in v0.2.0

type PrivateLinkResourceClientListByBatchAccountResponse struct {
	ListPrivateLinkResourcesResult
}

PrivateLinkResourceClientListByBatchAccountResponse contains the response from method PrivateLinkResourceClient.NewListByBatchAccountPager.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// READ-ONLY; The group id is used to establish the private link connection.
	GroupID *string

	// READ-ONLY; The list of required members that are used to establish the private link connection.
	RequiredMembers []*string

	// READ-ONLY; The list of required zone names for the private DNS resource name
	RequiredZoneNames []*string
}

PrivateLinkResourceProperties - Private link resource properties.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// REQUIRED; The status of the Batch private endpoint connection
	Status *PrivateLinkServiceConnectionStatus

	// Description of the private Connection state
	Description *string

	// READ-ONLY; Action required on the private connection state
	ActionRequired *string
}

PrivateLinkServiceConnectionState - The private link service connection state of the private endpoint connection

func (PrivateLinkServiceConnectionState) MarshalJSON added in v1.1.0

func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type PrivateLinkServiceConnectionStatus

type PrivateLinkServiceConnectionStatus string

PrivateLinkServiceConnectionStatus - The status of the Batch private endpoint connection

const (
	// PrivateLinkServiceConnectionStatusApproved - The private endpoint connection is approved and can be used to access Batch
	// account
	PrivateLinkServiceConnectionStatusApproved PrivateLinkServiceConnectionStatus = "Approved"
	// PrivateLinkServiceConnectionStatusPending - The private endpoint connection is pending and cannot be used to access Batch
	// account
	PrivateLinkServiceConnectionStatusPending PrivateLinkServiceConnectionStatus = "Pending"
	// PrivateLinkServiceConnectionStatusRejected - The private endpoint connection is rejected and cannot be used to access Batch
	// account
	PrivateLinkServiceConnectionStatusRejected PrivateLinkServiceConnectionStatus = "Rejected"
	// PrivateLinkServiceConnectionStatusDisconnected - The private endpoint connection is disconnected and cannot be used to
	// access Batch account
	PrivateLinkServiceConnectionStatusDisconnected PrivateLinkServiceConnectionStatus = "Disconnected"
)

func PossiblePrivateLinkServiceConnectionStatusValues

func PossiblePrivateLinkServiceConnectionStatusValues() []PrivateLinkServiceConnectionStatus

PossiblePrivateLinkServiceConnectionStatusValues returns the possible values for the PrivateLinkServiceConnectionStatus const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The provisioned state of the resource

const (
	// ProvisioningStateInvalid - The account is in an invalid state.
	ProvisioningStateInvalid ProvisioningState = "Invalid"
	// ProvisioningStateCreating - The account is being created.
	ProvisioningStateCreating ProvisioningState = "Creating"
	// ProvisioningStateDeleting - The account is being deleted.
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateSucceeded - The account has been created and is ready for use.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	// ProvisioningStateFailed - The last operation for the account is failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateCancelled - The last operation for the account is cancelled.
	ProvisioningStateCancelled ProvisioningState = "Cancelled"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

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.
	Name *string

	// READ-ONLY; The type of the resource.
	Type *string
}

ProxyResource - A definition of an Azure resource.

func (ProxyResource) MarshalJSON

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type PublicIPAddressConfiguration

type PublicIPAddressConfiguration struct {
	// The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 Spot/low-priority nodes
	// can be allocated for each public IP. For example, a pool needing 250 dedicated
	// VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}.
	IPAddressIDs []*string

	// The default value is BatchManaged
	Provision *IPAddressProvisioningType
}

PublicIPAddressConfiguration - The public IP Address configuration of the networking configuration of a Pool.

func (PublicIPAddressConfiguration) MarshalJSON

func (p PublicIPAddressConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PublicIPAddressConfiguration.

func (*PublicIPAddressConfiguration) UnmarshalJSON added in v1.1.0

func (p *PublicIPAddressConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressConfiguration.

type PublicNetworkAccessType

type PublicNetworkAccessType string

PublicNetworkAccessType - The network access type for operating on the resources in the Batch account.

const (
	// PublicNetworkAccessTypeEnabled - Enables connectivity to Azure Batch through public DNS.
	PublicNetworkAccessTypeEnabled PublicNetworkAccessType = "Enabled"
	// PublicNetworkAccessTypeDisabled - Disables public connectivity and enables private connectivity to Azure Batch Service
	// through private endpoint resource.
	PublicNetworkAccessTypeDisabled PublicNetworkAccessType = "Disabled"
)

func PossiblePublicNetworkAccessTypeValues

func PossiblePublicNetworkAccessTypeValues() []PublicNetworkAccessType

PossiblePublicNetworkAccessTypeValues returns the possible values for the PublicNetworkAccessType const type.

type ResizeError

type ResizeError struct {
	// REQUIRED; An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string

	// REQUIRED; A message describing the error, intended to be suitable for display in a user interface.
	Message *string

	// Additional details about the error.
	Details []*ResizeError
}

ResizeError - An error that occurred when resizing a pool.

func (ResizeError) MarshalJSON

func (r ResizeError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResizeError.

func (*ResizeError) UnmarshalJSON added in v1.1.0

func (r *ResizeError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResizeError.

type ResizeOperationStatus

type ResizeOperationStatus struct {
	// This property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady.
	Errors []*ResizeError

	// The default value is requeue.
	NodeDeallocationOption *ComputeNodeDeallocationOption

	// The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch
	// service returns an error; if you are calling the REST API directly, the HTTP
	// status code is 400 (Bad Request).
	ResizeTimeout *string

	// The time when this resize operation was started.
	StartTime *time.Time

	// The desired number of dedicated compute nodes in the pool.
	TargetDedicatedNodes *int32

	// The desired number of Spot/low-priority compute nodes in the pool.
	TargetLowPriorityNodes *int32
}

ResizeOperationStatus - Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady).

func (ResizeOperationStatus) MarshalJSON

func (r ResizeOperationStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResizeOperationStatus.

func (*ResizeOperationStatus) UnmarshalJSON

func (r *ResizeOperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResizeOperationStatus.

type Resource

type Resource 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
}

Resource - A definition of an Azure resource.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceFile

type ResourceFile struct {
	// The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be
	// specified.
	AutoStorageContainerName *string

	// The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename
	// or a subdirectory. If a prefix is not specified, all the files in the
	// container will be downloaded.
	BlobPrefix *string

	// This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for
	// a resourceFile which will be downloaded to a Windows node. If this property is
	// not specified for a Linux node, then a default value of 0770 is applied to the file.
	FileMode *string

	// If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded
	// to, including the filename. Otherwise, if the autoStorageContainerName or
	// storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case
	// where filePath is used as a directory, any directory structure already
	// associated with the input data will be retained in full and appended to the specified filePath directory. The specified
	// relative path cannot break out of the task's working directory (for example by
	// using '..').
	FilePath *string

	// The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be
	// specified. If the URL points to Azure Blob Storage, it must be readable from
	// compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS)
	// granting read permissions on the blob, use a managed identity with read
	// permission, or set the ACL for the blob or its container to allow public access.
	HTTPURL *string

	// The reference to a user assigned identity associated with the Batch pool which a compute node will use.
	IdentityReference *ComputeNodeIdentityReference

	// The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be
	// specified. This URL must be readable and listable from compute nodes. There are
	// three ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and
	// list permissions on the container, use a managed identity with read and list
	// permissions, or set the ACL for the container to allow public access.
	StorageContainerURL *string
}

ResourceFile - A single file or multiple files to be downloaded to a compute node.

func (ResourceFile) MarshalJSON added in v1.1.0

func (r ResourceFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceFile.

func (*ResourceFile) UnmarshalJSON added in v1.1.0

func (r *ResourceFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceFile.

type ResourceIdentityType

type ResourceIdentityType string

ResourceIdentityType - The type of identity used for the Batch account.

const (
	// ResourceIdentityTypeSystemAssigned - Batch account has a system assigned identity with it.
	ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
	// ResourceIdentityTypeUserAssigned - Batch account has user assigned identities with it.
	ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
	// ResourceIdentityTypeNone - Batch account has no identity associated with it. Setting `None` in update account will remove
	// existing identities.
	ResourceIdentityTypeNone ResourceIdentityType = "None"
)

func PossibleResourceIdentityTypeValues

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.

type SKUCapability

type SKUCapability struct {
	// READ-ONLY; The name of the feature.
	Name *string

	// READ-ONLY; The value of the feature.
	Value *string
}

SKUCapability - A SKU capability, such as the number of cores.

func (SKUCapability) MarshalJSON added in v1.1.0

func (s SKUCapability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUCapability.

func (*SKUCapability) UnmarshalJSON added in v1.1.0

func (s *SKUCapability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapability.

type ScaleSettings

type ScaleSettings struct {
	// This property and fixedScale are mutually exclusive and one of the properties must be specified.
	AutoScale *AutoScaleSettings

	// This property and autoScale are mutually exclusive and one of the properties must be specified.
	FixedScale *FixedScaleSettings
}

ScaleSettings - Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.

func (ScaleSettings) MarshalJSON added in v1.1.0

func (s ScaleSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScaleSettings.

func (*ScaleSettings) UnmarshalJSON added in v1.1.0

func (s *ScaleSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScaleSettings.

type StartTask

type StartTask struct {
	// The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment
	// variable expansion. If you want to take advantage of such features, you should
	// invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
	// Required if any other properties of the startTask are specified.
	CommandLine *string

	// When this is specified, all directories recursively below the AZBATCHNODEROOTDIR (the root of Azure Batch directories on
	// the node) are mapped into the container, all task environment variables are
	// mapped into the container, and the task command line is executed in the container.
	ContainerSettings *TaskContainerSettings

	// A list of environment variable settings for the start task.
	EnvironmentSettings []*EnvironmentSetting

	// The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of
	// retries. The Batch service will try the task once, and may then retry up to this
	// limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries).
	// If the maximum retry count is 0, the Batch service does not retry the task. If
	// the maximum retry count is -1, the Batch service retries the task without limit.
	MaxTaskRetryCount *int32

	// A list of files that the Batch service will download to the compute node before running the command line.
	ResourceFiles []*ResourceFile

	// If omitted, the task runs as a non-administrative user unique to the task.
	UserIdentity *UserIdentity

	// If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count
	// (maxTaskRetryCount). If the task has still not completed successfully after
	// all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition
	// can be detected via the node state and scheduling error detail. If false, the
	// Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute
	// node while the start task is still running; and even if the start task fails,
	// new tasks will continue to be scheduled on the node. The default is true.
	WaitForSuccess *bool
}

StartTask - In some cases the start task may be re-run even though the node was not rebooted. Due to this, start tasks should be idempotent and exit gracefully if the setup they're performing has already been done. Special care should be taken to avoid start tasks which create breakaway process or install/launch services from the start task working directory, as this will block Batch from being able to re-run the start task.

func (StartTask) MarshalJSON

func (s StartTask) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StartTask.

func (*StartTask) UnmarshalJSON added in v1.1.0

func (s *StartTask) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StartTask.

type StorageAccountType

type StorageAccountType string

StorageAccountType - The storage account type for use in creating data disks.

const (
	// StorageAccountTypeStandardLRS - The data disk should use standard locally redundant storage.
	StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS"
	// StorageAccountTypePremiumLRS - The data disk should use premium locally redundant storage.
	StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS"
)

func PossibleStorageAccountTypeValues

func PossibleStorageAccountTypeValues() []StorageAccountType

PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type.

type SupportedSKU

type SupportedSKU struct {
	// READ-ONLY; A collection of capabilities which this SKU supports.
	Capabilities []*SKUCapability

	// READ-ONLY; The family name of the SKU.
	FamilyName *string

	// READ-ONLY; The name of the SKU.
	Name *string
}

SupportedSKU - Describes a Batch supported SKU.

func (SupportedSKU) MarshalJSON

func (s SupportedSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SupportedSKU.

func (*SupportedSKU) UnmarshalJSON added in v1.1.0

func (s *SupportedSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedSKU.

type SupportedSKUsResult

type SupportedSKUsResult struct {
	// REQUIRED; The list of SKUs available for the Batch service in the location.
	Value []*SupportedSKU

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

SupportedSKUsResult - The Batch List supported SKUs operation response.

func (SupportedSKUsResult) MarshalJSON

func (s SupportedSKUsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SupportedSKUsResult.

func (*SupportedSKUsResult) UnmarshalJSON added in v1.1.0

func (s *SupportedSKUsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedSKUsResult.

type TaskContainerSettings

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

	// These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the
	// Batch Service.
	ContainerRunOptions *string

	// This setting can be omitted if was already provided at pool creation.
	Registry *ContainerRegistry

	// A flag to indicate where the container task working directory is. The default is 'taskWorkingDirectory'.
	WorkingDirectory *ContainerWorkingDirectory
}

TaskContainerSettings - The container settings for a task.

func (TaskContainerSettings) MarshalJSON added in v1.1.0

func (t TaskContainerSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TaskContainerSettings.

func (*TaskContainerSettings) UnmarshalJSON added in v1.1.0

func (t *TaskContainerSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TaskContainerSettings.

type TaskSchedulingPolicy

type TaskSchedulingPolicy struct {
	// REQUIRED; How tasks should be distributed across compute nodes.
	NodeFillType *ComputeNodeFillType
}

TaskSchedulingPolicy - Specifies how tasks should be distributed across compute nodes.

func (TaskSchedulingPolicy) MarshalJSON added in v1.1.0

func (t TaskSchedulingPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TaskSchedulingPolicy.

func (*TaskSchedulingPolicy) UnmarshalJSON added in v1.1.0

func (t *TaskSchedulingPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TaskSchedulingPolicy.

type UserAccount

type UserAccount struct {
	// REQUIRED; The name of the user account. Names can contain any Unicode characters up to a maximum length of 20.
	Name *string

	// REQUIRED; The password for the user account.
	Password *string

	// nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access
	// and operates with full Administrator permissions. The default value is
	// nonAdmin.
	ElevationLevel *ElevationLevel

	// This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options.
	LinuxUserConfiguration *LinuxUserConfiguration

	// This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the user
	// is created with the default options.
	WindowsUserConfiguration *WindowsUserConfiguration
}

UserAccount - Properties used to create a user on an Azure Batch node.

func (UserAccount) MarshalJSON added in v1.1.0

func (u UserAccount) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAccount.

func (*UserAccount) UnmarshalJSON added in v1.1.0

func (u *UserAccount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAccount.

type UserAssignedIdentities

type UserAssignedIdentities struct {
	// READ-ONLY; The client id of user assigned identity.
	ClientID *string

	// READ-ONLY; The principal id of user assigned identity.
	PrincipalID *string
}

UserAssignedIdentities - The list of associated user identities.

func (UserAssignedIdentities) MarshalJSON added in v1.1.0

func (u UserAssignedIdentities) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentities.

func (*UserAssignedIdentities) UnmarshalJSON added in v1.1.0

func (u *UserAssignedIdentities) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentities.

type UserIdentity

type UserIdentity struct {
	// The userName and autoUser properties are mutually exclusive; you must specify one but not both.
	AutoUser *AutoUserSpecification

	// The userName and autoUser properties are mutually exclusive; you must specify one but not both.
	UserName *string
}

UserIdentity - Specify either the userName or autoUser property, but not both.

func (UserIdentity) MarshalJSON added in v1.1.0

func (u UserIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserIdentity.

func (*UserIdentity) UnmarshalJSON added in v1.1.0

func (u *UserIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentity.

type VMExtension

type VMExtension struct {
	// REQUIRED; The name of the virtual machine extension.
	Name *string

	// REQUIRED; The name of the extension handler publisher.
	Publisher *string

	// REQUIRED; The type of the extensions.
	Type *string

	// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
	// however, the extension will not upgrade minor versions unless redeployed, even
	// with this property set to true.
	AutoUpgradeMinorVersion *bool

	// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
	ProtectedSettings any

	// Collection of extension names after which this extension needs to be provisioned.
	ProvisionAfterExtensions []*string

	// JSON formatted public settings for the extension.
	Settings any

	// The version of script handler.
	TypeHandlerVersion *string
}

VMExtension - The configuration for virtual machine extensions.

func (VMExtension) MarshalJSON

func (v VMExtension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMExtension.

func (*VMExtension) UnmarshalJSON added in v1.1.0

func (v *VMExtension) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMExtension.

type VirtualMachineConfiguration

type VirtualMachineConfiguration struct {
	// REQUIRED; A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual Machine.
	// To get the list of all imageReferences verified by Azure Batch, see the 'List
	// supported node agent SKUs' operation.
	ImageReference *ImageReference

	// REQUIRED; The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface
	// between the node and the Batch service. There are different implementations of the
	// node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected
	// image reference. To get the list of supported node agent SKUs along with their
	// list of verified image references, see the 'List supported node agent SKUs' operation.
	NodeAgentSKUID *string

	// If specified, setup is performed on each node in the pool to allow tasks to run in containers. All regular tasks and job
	// manager tasks run on this pool must specify the containerSettings property, and
	// all other tasks may specify it.
	ContainerConfiguration *ContainerConfiguration

	// This property must be specified if the compute nodes in the pool need to have empty data disks attached to them.
	DataDisks []*DataDisk

	// If specified, encryption is performed on each node in the pool during node provisioning.
	DiskEncryptionConfiguration *DiskEncryptionConfiguration

	// If specified, the extensions mentioned in this configuration will be installed on each node.
	Extensions []*VMExtension

	// This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises
	// licenses for the nodes which will be deployed. If omitted, no on-premises
	// licensing discount is applied. Values are:
	// WindowsServer - The on-premises license is for Windows Server. WindowsClient - The on-premises license is for Windows Client.
	LicenseType *string

	// This configuration will specify rules on how nodes in the pool will be physically allocated.
	NodePlacementConfiguration *NodePlacementConfiguration

	// Contains configuration for ephemeral OSDisk settings.
	OSDisk *OSDisk

	// This property must not be specified if the imageReference specifies a Linux OS image.
	WindowsConfiguration *WindowsConfiguration
}

VirtualMachineConfiguration - The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure.

func (VirtualMachineConfiguration) MarshalJSON

func (v VirtualMachineConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineConfiguration.

func (*VirtualMachineConfiguration) UnmarshalJSON added in v1.1.0

func (v *VirtualMachineConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineConfiguration.

type VirtualMachineFamilyCoreQuota

type VirtualMachineFamilyCoreQuota struct {
	// READ-ONLY; The core quota for the VM family for the Batch account.
	CoreQuota *int32

	// READ-ONLY; The Virtual Machine family name.
	Name *string
}

VirtualMachineFamilyCoreQuota - A VM Family and its associated core quota for the Batch account.

func (VirtualMachineFamilyCoreQuota) MarshalJSON added in v1.1.0

func (v VirtualMachineFamilyCoreQuota) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineFamilyCoreQuota.

func (*VirtualMachineFamilyCoreQuota) UnmarshalJSON added in v1.1.0

func (v *VirtualMachineFamilyCoreQuota) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineFamilyCoreQuota.

type WindowsConfiguration

type WindowsConfiguration struct {
	// If omitted, the default value is true.
	EnableAutomaticUpdates *bool
}

WindowsConfiguration - Windows operating system settings to apply to the virtual machine.

func (WindowsConfiguration) MarshalJSON added in v1.1.0

func (w WindowsConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WindowsConfiguration.

func (*WindowsConfiguration) UnmarshalJSON added in v1.1.0

func (w *WindowsConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WindowsConfiguration.

type WindowsUserConfiguration

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.
	LoginMode *LoginMode
}

WindowsUserConfiguration - Properties used to create a user account on a Windows node.

func (WindowsUserConfiguration) MarshalJSON added in v1.1.0

func (w WindowsUserConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WindowsUserConfiguration.

func (*WindowsUserConfiguration) UnmarshalJSON added in v1.1.0

func (w *WindowsUserConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WindowsUserConfiguration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL