armbatch

package module
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 15 Imported by: 0

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

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()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

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 AccessRule

type AccessRule struct {
	// Name of the access rule
	Name *string

	// Properties of Access Rule
	Properties *AccessRuleProperties
}

AccessRule - Access rule in a network security perimeter configuration profile

func (AccessRule) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessRule.

func (*AccessRule) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessRule.

type AccessRuleDirection

type AccessRuleDirection string

AccessRuleDirection - Direction of Access Rule

const (
	// AccessRuleDirectionInbound - Applies to inbound network traffic to the secured resources.
	AccessRuleDirectionInbound AccessRuleDirection = "Inbound"
	// AccessRuleDirectionOutbound - Applies to outbound network traffic from the secured resources
	AccessRuleDirectionOutbound AccessRuleDirection = "Outbound"
)

func PossibleAccessRuleDirectionValues

func PossibleAccessRuleDirectionValues() []AccessRuleDirection

PossibleAccessRuleDirectionValues returns the possible values for the AccessRuleDirection const type.

type AccessRuleProperties

type AccessRuleProperties struct {
	// Address prefixes in the CIDR format for inbound rules
	AddressPrefixes []*string

	// Direction of Access Rule
	Direction *AccessRuleDirection

	// Email addresses for outbound rules
	EmailAddresses []*string

	// Fully qualified domain names (FQDN) for outbound rules
	FullyQualifiedDomainNames []*string

	// Network security perimeters for inbound rules
	NetworkSecurityPerimeters []*NetworkSecurityPerimeter

	// Phone numbers for outbound rules
	PhoneNumbers []*string

	// Subscriptions for inbound rules
	Subscriptions []*AccessRulePropertiesSubscriptionsItem
}

AccessRuleProperties - Properties of Access Rule

func (AccessRuleProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessRuleProperties.

func (*AccessRuleProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessRuleProperties.

type AccessRulePropertiesSubscriptionsItem

type AccessRulePropertiesSubscriptionsItem struct {
	// The fully qualified Azure resource ID of the subscription e.g. ('/subscriptions/00000000-0000-0000-0000-000000000000')
	ID *string
}

AccessRulePropertiesSubscriptionsItem - Subscription identifiers

func (AccessRulePropertiesSubscriptionsItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessRulePropertiesSubscriptionsItem.

func (*AccessRulePropertiesSubscriptionsItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessRulePropertiesSubscriptionsItem.

type Account

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

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

MarshalJSON implements the json.Marshaller interface for type Account.

func (*Account) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Account.

type AccountClient

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

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_BYOS.json

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.987Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_Default.json

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.987Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_SystemAssignedIdentity.json

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.987Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_UserAssignedIdentity.json

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.987Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateBatchAccountCreate.json

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.987Z"); 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

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 2024-07-01

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

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

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • options - AccountClientGetOptions contains the optional parameters for the AccountClient.Get method.
Example (BatchAccountGet)

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

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.987Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateBatchAccountGet.json

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.987Z"); 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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • detectorID - The name of the detector.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/DetectorGet.json

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

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 2024-07-01

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

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

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

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 2024-07-01

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

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

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.987Z"); 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

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 2024-07-01

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

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

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

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 2024-07-01

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

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

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

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

Generated from API version 2024-07-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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountList.json

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.987Z"); 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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • parameters - The type of key to regenerate.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountRegenerateKey.json

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

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 2024-07-01

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

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

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • parameters - Additional parameters for account update.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountUpdate.json

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.987Z"); 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

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

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

type AccountClientBeginDeleteOptions

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

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

type AccountClientCreateResponse

type AccountClientCreateResponse struct {
	// Contains information about an Azure Batch account.
	Account
}

AccountClientCreateResponse contains the response from method AccountClient.BeginCreate.

type AccountClientDeleteResponse

type AccountClientDeleteResponse struct {
}

AccountClientDeleteResponse contains the response from method AccountClient.BeginDelete.

type AccountClientGetDetectorOptions

type AccountClientGetDetectorOptions struct {
}

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

type AccountClientGetDetectorResponse

type AccountClientGetDetectorResponse struct {
	// Contains the information for a detector.
	DetectorResponse
}

AccountClientGetDetectorResponse contains the response from method AccountClient.GetDetector.

type AccountClientGetKeysOptions

type AccountClientGetKeysOptions struct {
}

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

type AccountClientGetKeysResponse

type AccountClientGetKeysResponse struct {
	// A set of Azure Batch account keys.
	AccountKeys
}

AccountClientGetKeysResponse contains the response from method AccountClient.GetKeys.

type AccountClientGetOptions

type AccountClientGetOptions struct {
}

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

type AccountClientGetResponse

type AccountClientGetResponse struct {
	// Contains information about an Azure Batch account.
	Account
}

AccountClientGetResponse contains the response from method AccountClient.Get.

type AccountClientListByResourceGroupOptions

type AccountClientListByResourceGroupOptions struct {
}

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

type AccountClientListByResourceGroupResponse

type AccountClientListByResourceGroupResponse struct {
	// Values returned by the List operation.
	AccountListResult
}

AccountClientListByResourceGroupResponse contains the response from method AccountClient.NewListByResourceGroupPager.

type AccountClientListDetectorsOptions

type AccountClientListDetectorsOptions struct {
}

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

type AccountClientListDetectorsResponse

type AccountClientListDetectorsResponse struct {
	// Values returned by the List operation.
	DetectorListResult
}

AccountClientListDetectorsResponse contains the response from method AccountClient.NewListDetectorsPager.

type AccountClientListOptions

type AccountClientListOptions struct {
}

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

type AccountClientListOutboundNetworkDependenciesEndpointsOptions

type AccountClientListOutboundNetworkDependenciesEndpointsOptions struct {
}

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

type AccountClientListOutboundNetworkDependenciesEndpointsResponse

type AccountClientListOutboundNetworkDependenciesEndpointsResponse struct {
	// Values returned by the List operation.
	OutboundEnvironmentEndpointCollection
}

AccountClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method AccountClient.NewListOutboundNetworkDependenciesEndpointsPager.

type AccountClientListResponse

type AccountClientListResponse struct {
	// Values returned by the List operation.
	AccountListResult
}

AccountClientListResponse contains the response from method AccountClient.NewListPager.

type AccountClientRegenerateKeyOptions

type AccountClientRegenerateKeyOptions struct {
}

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

type AccountClientRegenerateKeyResponse

type AccountClientRegenerateKeyResponse struct {
	// A set of Azure Batch account keys.
	AccountKeys
}

AccountClientRegenerateKeyResponse contains the response from method AccountClient.RegenerateKey.

type AccountClientSynchronizeAutoStorageKeysOptions

type AccountClientSynchronizeAutoStorageKeysOptions struct {
}

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

type AccountClientSynchronizeAutoStorageKeysResponse

type AccountClientSynchronizeAutoStorageKeysResponse struct {
}

AccountClientSynchronizeAutoStorageKeysResponse contains the response from method AccountClient.SynchronizeAutoStorageKeys.

type AccountClientUpdateOptions

type AccountClientUpdateOptions struct {
}

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

type AccountClientUpdateResponse

type AccountClientUpdateResponse struct {
	// Contains information about an Azure Batch account.
	Account
}

AccountClientUpdateResponse contains the response from method AccountClient.Update.

type AccountCreateParameters

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

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

MarshalJSON implements the json.Marshaller interface for type AccountCreateParameters.

func (*AccountCreateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountCreateParameters.

type AccountCreateProperties

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 Microsoft Entra ID. If the mode
	// is UserSubscription, clients must use Microsoft Entra ID. The default is BatchService.
	PoolAllocationMode *PoolAllocationMode

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

AccountCreateProperties - The properties of a Batch account.

func (AccountCreateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountCreateProperties.

func (*AccountCreateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountCreateProperties.

type AccountIdentity

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

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

MarshalJSON implements the json.Marshaller interface for type AccountIdentity.

func (*AccountIdentity) UnmarshalJSON

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

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

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

MarshalJSON implements the json.Marshaller interface for type AccountKeys.

func (*AccountKeys) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountKeys.

type AccountListResult

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

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

MarshalJSON implements the json.Marshaller interface for type AccountListResult.

func (*AccountListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountListResult.

type AccountProperties

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

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

MarshalJSON implements the json.Marshaller interface for type AccountProperties.

func (*AccountProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountProperties.

type AccountRegenerateKeyParameters

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

AccountRegenerateKeyParameters - Parameters supplied to the RegenerateKey operation.

func (AccountRegenerateKeyParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountRegenerateKeyParameters.

func (*AccountRegenerateKeyParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountRegenerateKeyParameters.

type AccountUpdateParameters

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

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

MarshalJSON implements the json.Marshaller interface for type AccountUpdateParameters.

func (*AccountUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountUpdateParameters.

type AccountUpdateProperties

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

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

MarshalJSON implements the json.Marshaller interface for type AccountUpdateProperties.

func (*AccountUpdateProperties) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type ActivateApplicationPackageParameters.

func (*ActivateApplicationPackageParameters) UnmarshalJSON

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 (
	// AllocationStateResizing - The pool is resizing; that is, compute nodes are being added to or removed from the pool.
	AllocationStateResizing AllocationState = "Resizing"
	// 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"
	// 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

	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

	// READ-ONLY; The ID of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the resource.
	Type *string
}

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationCreate.json

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationDelete.json

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationGet.json

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • options - ApplicationClientListOptions contains the optional parameters for the ApplicationClient.NewListPager method.
Example

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationUpdate.json

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

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

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

type ApplicationClientCreateResponse

type ApplicationClientCreateResponse struct {
	// Contains information about an application in a Batch account.
	Application
}

ApplicationClientCreateResponse contains the response from method ApplicationClient.Create.

type ApplicationClientDeleteOptions

type ApplicationClientDeleteOptions struct {
}

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

type ApplicationClientDeleteResponse

type ApplicationClientDeleteResponse struct {
}

ApplicationClientDeleteResponse contains the response from method ApplicationClient.Delete.

type ApplicationClientGetOptions

type ApplicationClientGetOptions struct {
}

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

type ApplicationClientGetResponse

type ApplicationClientGetResponse struct {
	// Contains information about an application in a Batch account.
	Application
}

ApplicationClientGetResponse contains the response from method ApplicationClient.Get.

type ApplicationClientListOptions

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

type ApplicationClientListResponse struct {
	// The result of performing list applications.
	ListApplicationsResult
}

ApplicationClientListResponse contains the response from method ApplicationClient.NewListPager.

type ApplicationClientUpdateOptions

type ApplicationClientUpdateOptions struct {
}

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

type ApplicationClientUpdateResponse

type ApplicationClientUpdateResponse struct {
	// Contains information about an application in a Batch account.
	Application
}

ApplicationClientUpdateResponse contains the response from method ApplicationClient.Update.

type ApplicationPackage

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

	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageActivate.json

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.933Z"); 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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageCreate.json

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.933Z"); 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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageDelete.json

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageGet.json

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.933Z"); return t}()),
// 		State: to.Ptr(armbatch.PackageStateActive),
// 	},
// }
Output:

func (*ApplicationPackageClient) NewListPager

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • applicationName - The name of the application. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageList.json

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.933Z"); return t}()),
	// 				State: to.Ptr(armbatch.PackageStateActive),
	// 			},
	// 	}},
	// }
}
Output:

type ApplicationPackageClientActivateOptions

type ApplicationPackageClientActivateOptions struct {
}

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

type ApplicationPackageClientActivateResponse

type ApplicationPackageClientActivateResponse struct {
	// An application package which represents a particular version of an application.
	ApplicationPackage
}

ApplicationPackageClientActivateResponse contains the response from method ApplicationPackageClient.Activate.

type ApplicationPackageClientCreateOptions

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

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

type ApplicationPackageClientCreateResponse

type ApplicationPackageClientCreateResponse struct {
	// An application package which represents a particular version of an application.
	ApplicationPackage
}

ApplicationPackageClientCreateResponse contains the response from method ApplicationPackageClient.Create.

type ApplicationPackageClientDeleteOptions

type ApplicationPackageClientDeleteOptions struct {
}

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

type ApplicationPackageClientDeleteResponse

type ApplicationPackageClientDeleteResponse struct {
}

ApplicationPackageClientDeleteResponse contains the response from method ApplicationPackageClient.Delete.

type ApplicationPackageClientGetOptions

type ApplicationPackageClientGetOptions struct {
}

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

type ApplicationPackageClientGetResponse

type ApplicationPackageClientGetResponse struct {
	// An application package which represents a particular version of an application.
	ApplicationPackage
}

ApplicationPackageClientGetResponse contains the response from method ApplicationPackageClient.Get.

type ApplicationPackageClientListOptions

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

type ApplicationPackageClientListResponse struct {
	// The result of performing list application packages.
	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

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

MarshalJSON implements the json.Marshaller interface for type ApplicationPackageReference.

func (*ApplicationPackageReference) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type ApplicationProperties.

func (*ApplicationProperties) UnmarshalJSON

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 (
	// AuthenticationModeAAD - The authentication mode using Microsoft Entra ID.
	AuthenticationModeAAD AuthenticationMode = "AAD"
	// AuthenticationModeSharedKey - The authentication mode using shared keys.
	AuthenticationModeSharedKey AuthenticationMode = "SharedKey"
	// 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

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

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

MarshalJSON implements the json.Marshaller interface for type AutoScaleSettings.

func (*AutoScaleSettings) UnmarshalJSON

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 (
	// AutoStorageAuthenticationModeBatchAccountManagedIdentity - The Batch service will authenticate requests to auto-storage
	// using the managed identity assigned to the Batch account.
	AutoStorageAuthenticationModeBatchAccountManagedIdentity AutoStorageAuthenticationMode = "BatchAccountManagedIdentity"
	// AutoStorageAuthenticationModeStorageKeys - The Batch service will authenticate requests to auto-storage using storage account
	// keys.
	AutoStorageAuthenticationModeStorageKeys AutoStorageAuthenticationMode = "StorageKeys"
)

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

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

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

MarshalJSON implements the json.Marshaller interface for type AutoUserSpecification.

func (*AutoUserSpecification) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AutoUserSpecification.

type AutomaticOSUpgradePolicy

type AutomaticOSUpgradePolicy struct {
	// Whether OS image rollback feature should be disabled.
	DisableAutomaticRollback *bool

	// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer
	// version of the OS image becomes available.
	// If this is set to true for Windows based pools, WindowsConfiguration.enableAutomaticUpdates [https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration]
	// cannot be set to true.
	EnableAutomaticOSUpgrade *bool

	// Defer OS upgrades on the TVMs if they are running tasks.
	OSRollingUpgradeDeferral *bool

	// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default
	// policy if no policy is defined on the VMSS.
	UseRollingUpgradePolicy *bool
}

AutomaticOSUpgradePolicy - The configuration parameters used for performing automatic OS upgrade.

func (AutomaticOSUpgradePolicy) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AutomaticOSUpgradePolicy.

func (*AutomaticOSUpgradePolicy) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticOSUpgradePolicy.

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

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

MarshalJSON implements the json.Marshaller interface for type AzureBlobFileSystemConfiguration.

func (*AzureBlobFileSystemConfiguration) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type AzureFileShareConfiguration.

func (*AzureFileShareConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareConfiguration.

type AzureProxyResource

type AzureProxyResource struct {
	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

	// READ-ONLY; The ID of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the resource.
	Type *string
}

AzureProxyResource - A definition of an Azure resource.

func (AzureProxyResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureProxyResource.

func (*AzureProxyResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureProxyResource.

type AzureResource

type AzureResource struct {
	// READ-ONLY; The ID of the resource.
	ID *string

	// READ-ONLY; The location of the resource.
	Location *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The type of the resource.
	Type *string
}

AzureResource - A definition of an Azure resource.

func (AzureResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureResource.

func (*AzureResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResource.

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

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

MarshalJSON implements the json.Marshaller interface for type CIFSMountConfiguration.

func (*CIFSMountConfiguration) UnmarshalJSON

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

	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

	// READ-ONLY; The ID of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the resource.
	Type *string
}

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/CertificateDelete.json

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/CertificateCancelDeletion.json

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.329Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.442Z"); 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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/CertificateCreate_Full.json

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.442Z"); return t}()),
// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
// 	},
// }
Output:

Example (CreateCertificateMinimalCer)

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

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.442Z"); return t}()),
// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
// 	},
// }
Output:

Example (CreateCertificateMinimalPfx)

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

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.442Z"); 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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/CertificateGet.json

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.442Z"); return t}()),
// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
// 	},
// }
Output:

Example (GetCertificateWithDeletionError)

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

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.562Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.CertificateProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-21T01:47:38.442Z"); return t}()),
// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
// 	},
// }
Output:

func (*CertificateClient) NewListByBatchAccountPager

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • options - CertificateClientListByBatchAccountOptions contains the optional parameters for the CertificateClient.NewListByBatchAccountPager method.
Example (ListCertificates)

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

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.442Z"); return t}()),
	// 				PublicData: to.Ptr("MIICrjCCAZagAwI..."),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListCertificatesFilterAndSelect)

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • certificateName - The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/CertificateUpdate.json

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.442Z"); return t}()),
// 		PublicData: to.Ptr("MIICrjCCAZagAwI..."),
// 	},
// }
Output:

type CertificateClientBeginDeleteOptions

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

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

type CertificateClientCancelDeletionOptions

type CertificateClientCancelDeletionOptions struct {
}

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

type CertificateClientCancelDeletionResponse

type CertificateClientCancelDeletionResponse struct {
	// Contains information about a certificate.
	Certificate

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientCancelDeletionResponse contains the response from method CertificateClient.CancelDeletion.

type CertificateClientCreateOptions

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

type CertificateClientCreateResponse struct {
	// Contains information about a certificate.
	Certificate

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientCreateResponse contains the response from method CertificateClient.Create.

type CertificateClientDeleteResponse

type CertificateClientDeleteResponse struct {
}

CertificateClientDeleteResponse contains the response from method CertificateClient.BeginDelete.

type CertificateClientGetOptions

type CertificateClientGetOptions struct {
}

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

type CertificateClientGetResponse

type CertificateClientGetResponse struct {
	// Contains information about a certificate.
	Certificate

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientGetResponse contains the response from method CertificateClient.Get.

type CertificateClientListByBatchAccountOptions

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

type CertificateClientListByBatchAccountResponse struct {
	// Values returned by the List operation.
	ListCertificatesResult
}

CertificateClientListByBatchAccountResponse contains the response from method CertificateClient.NewListByBatchAccountPager.

type CertificateClientUpdateOptions

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

type CertificateClientUpdateResponse struct {
	// Contains information about a certificate.
	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

	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

	// READ-ONLY; The ID of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the resource.
	Type *string
}

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

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 (
	// CertificateFormatCer - The certificate is a base64-encoded X.509 certificate.
	CertificateFormatCer CertificateFormat = "Cer"
	// CertificateFormatPfx - The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.
	CertificateFormatPfx CertificateFormat = "Pfx"
)

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 (
	// 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"
	// CertificateProvisioningStateSucceeded - The certificate is available for use in pools.
	CertificateProvisioningStateSucceeded CertificateProvisioningState = "Succeeded"
)

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 compute nodes. For
	// Linux compute nodes, the certificates are stored in a directory inside the task
	// working directory and an environment variable AZBATCHCERTIFICATES_DIR is supplied to the task to query for this location.
	// For certificates with visibility of 'remoteUser', a 'certs' directory is
	// created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.
	StoreLocation *CertificateStoreLocation

	// This property is applicable only for pools configured with Windows compute nodes. Common store names include: My, Root,
	// CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook,
	// but any custom store name can also be used. The default value is My.
	StoreName *string

	// Which user accounts on the compute node should have access to the private data of the certificate.
	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

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 compute nodes. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZBATCHCERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.

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 (
	// CertificateVisibilityRemoteUser - The certificate should be visible to the user accounts under which users remotely access
	// the node.
	CertificateVisibilityRemoteUser CertificateVisibility = "RemoteUser"
	// 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"
)

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

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityParameters.

func (*CheckNameAvailabilityParameters) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.

func (*CheckNameAvailabilityResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.

type ClientFactory

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

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

func (c *ClientFactory) NewAccountClient() *AccountClient

NewAccountClient creates a new instance of AccountClient.

func (*ClientFactory) NewApplicationClient

func (c *ClientFactory) NewApplicationClient() *ApplicationClient

NewApplicationClient creates a new instance of ApplicationClient.

func (*ClientFactory) NewApplicationPackageClient

func (c *ClientFactory) NewApplicationPackageClient() *ApplicationPackageClient

NewApplicationPackageClient creates a new instance of ApplicationPackageClient.

func (*ClientFactory) NewCertificateClient

func (c *ClientFactory) NewCertificateClient() *CertificateClient

NewCertificateClient creates a new instance of CertificateClient.

func (*ClientFactory) NewLocationClient

func (c *ClientFactory) NewLocationClient() *LocationClient

NewLocationClient creates a new instance of LocationClient.

func (*ClientFactory) NewNetworkSecurityPerimeterClient

func (c *ClientFactory) NewNetworkSecurityPerimeterClient() *NetworkSecurityPerimeterClient

NewNetworkSecurityPerimeterClient creates a new instance of NetworkSecurityPerimeterClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPoolClient

func (c *ClientFactory) NewPoolClient() *PoolClient

NewPoolClient creates a new instance of PoolClient.

func (*ClientFactory) NewPrivateEndpointConnectionClient

func (c *ClientFactory) NewPrivateEndpointConnectionClient() *PrivateEndpointConnectionClient

NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient.

func (*ClientFactory) NewPrivateLinkResourceClient

func (c *ClientFactory) NewPrivateLinkResourceClient() *PrivateLinkResourceClient

NewPrivateLinkResourceClient creates a new instance of PrivateLinkResourceClient.

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"
	// 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"
	// ComputeNodeDeallocationOptionTaskCompletion - Allow currently running tasks to complete. Schedule no new tasks while waiting.
	// Remove nodes when all tasks have completed.
	ComputeNodeDeallocationOptionTaskCompletion ComputeNodeDeallocationOption = "TaskCompletion"
	// 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"
)

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 (
	// 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"
	// ComputeNodeFillTypeSpread - Tasks should be assigned evenly across all nodes in the pool.
	ComputeNodeFillTypeSpread ComputeNodeFillType = "Spread"
)

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

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

MarshalJSON implements the json.Marshaller interface for type ComputeNodeIdentityReference.

func (*ComputeNodeIdentityReference) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComputeNodeIdentityReference.

type ContainerConfiguration

type ContainerConfiguration struct {
	// REQUIRED; The container technology to be used.
	Type *ContainerType

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

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerConfiguration.

type ContainerHostBatchBindMountEntry

type ContainerHostBatchBindMountEntry struct {
	// For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write
	// access for the path, it depends on the access in host VM. If this path is
	// mounted read-only, all users within the container will not be able to modify the path.
	IsReadOnly *bool

	// The paths which will be mounted to container task's container.
	Source *ContainerHostDataPath
}

ContainerHostBatchBindMountEntry - The entry of path and mount mode you want to mount into task container.

func (ContainerHostBatchBindMountEntry) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContainerHostBatchBindMountEntry.

func (*ContainerHostBatchBindMountEntry) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerHostBatchBindMountEntry.

type ContainerHostDataPath

type ContainerHostDataPath string

ContainerHostDataPath - The paths which will be mounted to container task's container.

const (
	// ContainerHostDataPathApplications - The applications path.
	ContainerHostDataPathApplications ContainerHostDataPath = "Applications"
	// ContainerHostDataPathJobPrep - The job-prep task path.
	ContainerHostDataPathJobPrep ContainerHostDataPath = "JobPrep"
	// ContainerHostDataPathShared - The path for multi-instances task to shared their files.
	ContainerHostDataPathShared ContainerHostDataPath = "Shared"
	// ContainerHostDataPathStartup - The path for start task.
	ContainerHostDataPathStartup ContainerHostDataPath = "Startup"
	// ContainerHostDataPathTask - The task path.
	ContainerHostDataPathTask ContainerHostDataPath = "Task"
	// ContainerHostDataPathVfsMounts - The path contains all virtual file systems are mounted on this node.
	ContainerHostDataPathVfsMounts ContainerHostDataPath = "VfsMounts"
)

func PossibleContainerHostDataPathValues

func PossibleContainerHostDataPathValues() []ContainerHostDataPath

PossibleContainerHostDataPathValues returns the possible values for the ContainerHostDataPath const type.

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

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

MarshalJSON implements the json.Marshaller interface for type ContainerRegistry.

func (*ContainerRegistry) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistry.

type ContainerType

type ContainerType string

ContainerType - The container technology to be used.

const (
	// ContainerTypeCriCompatible - A CRI based technology will be used to launch the containers.
	ContainerTypeCriCompatible ContainerType = "CriCompatible"
	// ContainerTypeDockerCompatible - A Docker compatible container technology will be used to launch the containers.
	ContainerTypeDockerCompatible ContainerType = "DockerCompatible"
)

func PossibleContainerTypeValues

func PossibleContainerTypeValues() []ContainerType

PossibleContainerTypeValues returns the possible values for the ContainerType const type.

type ContainerWorkingDirectory

type ContainerWorkingDirectory string

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

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

func PossibleContainerWorkingDirectoryValues

func PossibleContainerWorkingDirectoryValues() []ContainerWorkingDirectory

PossibleContainerWorkingDirectoryValues returns the possible values for the ContainerWorkingDirectory const type.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType 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

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

MarshalJSON implements the json.Marshaller interface for type DataDisk.

func (*DataDisk) UnmarshalJSON

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

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeleteCertificateError.

type DeploymentConfiguration

type DeploymentConfiguration struct {
	// The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure.
	VirtualMachineConfiguration *VirtualMachineConfiguration
}

DeploymentConfiguration - Deployment configuration properties.

func (DeploymentConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeploymentConfiguration.

func (*DeploymentConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentConfiguration.

type DetectorListResult

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

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

MarshalJSON implements the json.Marshaller interface for type DetectorListResult.

func (*DetectorListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DetectorListResult.

type DetectorResponse

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

	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

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

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

MarshalJSON implements the json.Marshaller interface for type DetectorResponse.

func (*DetectorResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponse.

type DetectorResponseProperties

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

DetectorResponseProperties - Detector response properties.

func (DetectorResponseProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DetectorResponseProperties.

func (*DetectorResponseProperties) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type DiffDiskSettings.

func (*DiffDiskSettings) UnmarshalJSON

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 Azure Compute Gallery Image.

func (DiskEncryptionConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiskEncryptionConfiguration.

func (*DiskEncryptionConfiguration) UnmarshalJSON

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

type DynamicVNetAssignmentScope string

DynamicVNetAssignmentScope - The scope of dynamic vnet assignment.

const (
	// 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"
	// DynamicVNetAssignmentScopeNone - No dynamic VNet assignment is enabled.
	DynamicVNetAssignmentScopeNone DynamicVNetAssignmentScope = "none"
)

func PossibleDynamicVNetAssignmentScopeValues

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 (
	// ElevationLevelAdmin - The user is a user with elevated access and operates with full Administrator permissions.
	ElevationLevelAdmin ElevationLevel = "Admin"
	// ElevationLevelNonAdmin - The user is a standard user without elevated access.
	ElevationLevelNonAdmin ElevationLevel = "NonAdmin"
)

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

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

MarshalJSON implements the json.Marshaller interface for type EncryptionProperties.

func (*EncryptionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProperties.

type EndpointAccessDefaultAction

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

func PossibleEndpointAccessDefaultActionValues() []EndpointAccessDefaultAction

PossibleEndpointAccessDefaultActionValues returns the possible values for the EndpointAccessDefaultAction const type.

type EndpointAccessProfile

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

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

MarshalJSON implements the json.Marshaller interface for type EndpointAccessProfile.

func (*EndpointAccessProfile) UnmarshalJSON

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

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

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

MarshalJSON implements the json.Marshaller interface for type EndpointDetail.

func (*EndpointDetail) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentSetting.

func (*EnvironmentSetting) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentSetting.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

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

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

MarshalJSON implements the json.Marshaller interface for type FixedScaleSettings.

func (*FixedScaleSettings) UnmarshalJSON

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"
	// IPAddressProvisioningTypeNoPublicIPAddresses - No public IP Address will be created for the Compute Nodes in the Pool.
	IPAddressProvisioningTypeNoPublicIPAddresses IPAddressProvisioningType = "NoPublicIPAddresses"
	// IPAddressProvisioningTypeUserManaged - Public IPs are provided by the user and will be used to provision the Compute Nodes.
	IPAddressProvisioningTypeUserManaged IPAddressProvisioningType = "UserManaged"
)

func PossibleIPAddressProvisioningTypeValues

func PossibleIPAddressProvisioningTypeValues() []IPAddressProvisioningType

PossibleIPAddressProvisioningTypeValues returns the possible values for the IPAddressProvisioningType const type.

type IPRule

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

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

MarshalJSON implements the json.Marshaller interface for type IPRule.

func (*IPRule) UnmarshalJSON

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 and can be fetched from community gallery image GET call.
	CommunityGalleryImageID *string

	// This property is mutually exclusive with other properties. The Azure Compute Gallery Image must have replicas in the same
	// region as the Azure Batch account. For information about the firewall settings
	// for the Batch node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
	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

	// This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call.
	SharedGalleryImageID *string

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

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

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

MarshalJSON implements the json.Marshaller interface for type ImageReference.

func (*ImageReference) UnmarshalJSON

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

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 (
	// InterNodeCommunicationStateDisabled - Disable network communication between virtual machines.
	InterNodeCommunicationStateDisabled InterNodeCommunicationState = "Disabled"
	// InterNodeCommunicationStateEnabled - Enable network communication between virtual machines.
	InterNodeCommunicationStateEnabled InterNodeCommunicationState = "Enabled"
)

func PossibleInterNodeCommunicationStateValues

func PossibleInterNodeCommunicationStateValues() []InterNodeCommunicationState

PossibleInterNodeCommunicationStateValues returns the possible values for the InterNodeCommunicationState const type.

type IssueType

type IssueType string

IssueType - Type of issue

const (
	// IssueTypeConfigurationPropagationFailure - An error occurred while applying the network security perimeter (NSP) configuration.
	IssueTypeConfigurationPropagationFailure IssueType = "ConfigurationPropagationFailure"
	// IssueTypeMissingIdentityConfiguration - An managed identity hasn't been associated with the resource. The resource will
	// still be able to validate inbound traffic from the network security perimeter (NSP) or matching inbound access rules, but
	// it won't be able to perform outbound access as a member of the NSP.
	IssueTypeMissingIdentityConfiguration IssueType = "MissingIdentityConfiguration"
	// IssueTypeMissingPerimeterConfiguration - A network connectivity issue is happening on the resource which could be addressed
	// either by adding new resources to the network security perimeter (NSP) or by modifying access rules.
	IssueTypeMissingPerimeterConfiguration IssueType = "MissingPerimeterConfiguration"
	// IssueTypeUnknown - Unknown issue type
	IssueTypeUnknown IssueType = "Unknown"
)

func PossibleIssueTypeValues

func PossibleIssueTypeValues() []IssueType

PossibleIssueTypeValues returns the possible values for the IssueType 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 secret with or without version. Example https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053.
	// or https://mykeyvault.vault.azure.net/keys/testkey. 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

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.

func (*KeyVaultProperties) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type KeyVaultReference.

func (*KeyVaultReference) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type LinuxUserConfiguration.

func (*LinuxUserConfiguration) UnmarshalJSON

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

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

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

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

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

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

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 2024-07-01

  • locationName - The desired region for the name check.
  • parameters - Properties needed to check the availability of a name.
  • options - LocationClientCheckNameAvailabilityOptions contains the optional parameters for the LocationClient.CheckNameAvailability method.
Example (LocationCheckNameAvailabilityAlreadyExists)

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

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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationCheckNameAvailability_Available.json

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 2024-07-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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationGetQuotas.json

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) NewListSupportedVirtualMachineSKUsPager

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

Generated from API version 2024-07-01

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

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

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"),
	// 		},
	// 		{
	// 			Name: to.Ptr("Standard_A1"),
	// 			BatchSupportEndOfLife: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-31T00:00:00.000Z"); return t}()),
	// 			Capabilities: []*armbatch.SKUCapability{
	// 				{
	// 					Name: to.Ptr("MaxResourceVolumeMB"),
	// 					Value: to.Ptr("71680"),
	// 				},
	// 				{
	// 					Name: to.Ptr("OSVhdSizeMB"),
	// 					Value: to.Ptr("1047552"),
	// 				},
	// 				{
	// 					Name: to.Ptr("vCPUs"),
	// 					Value: to.Ptr("1"),
	// 				},
	// 				{
	// 					Name: to.Ptr("MemoryPreservingMaintenanceSupported"),
	// 					Value: to.Ptr("True"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HyperVGenerations"),
	// 					Value: to.Ptr("V1"),
	// 				},
	// 				{
	// 					Name: to.Ptr("MemoryGB"),
	// 					Value: to.Ptr("1.75"),
	// 				},
	// 				{
	// 					Name: to.Ptr("MaxDataDiskCount"),
	// 					Value: to.Ptr("2"),
	// 				},
	// 				{
	// 					Name: to.Ptr("CpuArchitectureType"),
	// 					Value: to.Ptr("x64"),
	// 				},
	// 				{
	// 					Name: to.Ptr("LowPriorityCapable"),
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Name: to.Ptr("PremiumIO"),
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Name: to.Ptr("VMDeploymentTypes"),
	// 					Value: to.Ptr("IaaS,PaaS"),
	// 				},
	// 				{
	// 					Name: to.Ptr("vCPUsAvailable"),
	// 					Value: to.Ptr("1"),
	// 				},
	// 				{
	// 					Name: to.Ptr("ACUs"),
	// 					Value: to.Ptr("100"),
	// 				},
	// 				{
	// 					Name: to.Ptr("vCPUsPerCore"),
	// 					Value: to.Ptr("1"),
	// 				},
	// 				{
	// 					Name: to.Ptr("EphemeralOSDiskSupported"),
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Name: to.Ptr("EncryptionAtHostSupported"),
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Name: to.Ptr("CapacityReservationSupported"),
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Name: to.Ptr("AcceleratedNetworkingEnabled"),
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Name: to.Ptr("RdmaEnabled"),
	// 					Value: to.Ptr("False"),
	// 				},
	// 				{
	// 					Name: to.Ptr("MaxNetworkInterfaces"),
	// 					Value: to.Ptr("2"),
	// 			}},
	// 			FamilyName: to.Ptr("standardA0_A7Family"),
	// 	}},
	// }
}
Output:

type LocationClientCheckNameAvailabilityOptions

type LocationClientCheckNameAvailabilityOptions struct {
}

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

type LocationClientCheckNameAvailabilityResponse

type LocationClientCheckNameAvailabilityResponse struct {
	// The CheckNameAvailability operation response.
	CheckNameAvailabilityResult
}

LocationClientCheckNameAvailabilityResponse contains the response from method LocationClient.CheckNameAvailability.

type LocationClientGetQuotasOptions

type LocationClientGetQuotasOptions struct {
}

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

type LocationClientGetQuotasResponse

type LocationClientGetQuotasResponse struct {
	// Quotas associated with a Batch region for a particular subscription.
	LocationQuota
}

LocationClientGetQuotasResponse contains the response from method LocationClient.GetQuotas.

type LocationClientListSupportedVirtualMachineSKUsOptions

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

type LocationClientListSupportedVirtualMachineSKUsResponse struct {
	// The Batch List supported SKUs operation response.
	SupportedSKUsResult
}

LocationClientListSupportedVirtualMachineSKUsResponse contains the response from method LocationClient.NewListSupportedVirtualMachineSKUsPager.

type LocationQuota

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

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

MarshalJSON implements the json.Marshaller interface for type LocationQuota.

func (*LocationQuota) UnmarshalJSON

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 is Interactive.

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 ManagedDisk

type ManagedDisk struct {
	// Specifies the security profile settings for the managed disk. Note: It can only be set for Confidential VMs and is required
	// when using Confidential VMs.
	SecurityProfile *VMDiskSecurityProfile

	// The storage account type for use in creating data disks or OS disk.
	StorageAccountType *StorageAccountType
}

func (ManagedDisk) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ManagedDisk.

func (*ManagedDisk) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDisk.

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

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

MarshalJSON implements the json.Marshaller interface for type MetadataItem.

func (*MetadataItem) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type MountConfiguration.

func (*MountConfiguration) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type NFSMountConfiguration.

func (*NFSMountConfiguration) UnmarshalJSON

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 (
	// NameAvailabilityReasonAlreadyExists - The requested name is already in use.
	NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists"
	// NameAvailabilityReasonInvalid - The requested name is invalid.
	NameAvailabilityReasonInvalid NameAvailabilityReason = "Invalid"
)

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

	// Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance.
	// For more details, see:
	// https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview.
	EnableAcceleratedNetworking *bool

	// The endpoint configuration for a pool.
	EndpointConfiguration *PoolEndpointConfiguration

	// The public IP Address configuration of the networking configuration of a Pool.
	PublicIPAddressConfiguration *PublicIPAddressConfiguration

	// The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should
	// 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. Enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows.
	// Also enable outbound connections to Azure Storage on port 443. For more details
	// see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration
	SubnetID *string
}

NetworkConfiguration - The network configuration for a pool.

func (NetworkConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkConfiguration.

func (*NetworkConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConfiguration.

type NetworkProfile

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

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

MarshalJSON implements the json.Marshaller interface for type NetworkProfile.

func (*NetworkProfile) UnmarshalJSON

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

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 NetworkSecurityPerimeter

type NetworkSecurityPerimeter struct {
	// Fully qualified Azure resource ID of the NSP resource
	ID *string

	// Location of the network security perimeter
	Location *string

	// Universal unique ID (UUID) of the network security perimeter
	PerimeterGUID *string
}

NetworkSecurityPerimeter - Information about a network security perimeter (NSP)

func (NetworkSecurityPerimeter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeter.

func (*NetworkSecurityPerimeter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeter.

type NetworkSecurityPerimeterClient

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

NetworkSecurityPerimeterClient contains the methods for the NetworkSecurityPerimeter group. Don't use this type directly, use NewNetworkSecurityPerimeterClient() instead.

func NewNetworkSecurityPerimeterClient

func NewNetworkSecurityPerimeterClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterClient, error)

NewNetworkSecurityPerimeterClient creates a new instance of NetworkSecurityPerimeterClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NetworkSecurityPerimeterClient) BeginReconcileConfiguration

func (client *NetworkSecurityPerimeterClient) BeginReconcileConfiguration(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions) (*runtime.Poller[NetworkSecurityPerimeterClientReconcileConfigurationResponse], error)

BeginReconcileConfiguration - Reconciles the specified NSP configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration
  • options - NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions contains the optional parameters for the NetworkSecurityPerimeterClient.BeginReconcileConfiguration method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationReconcile.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNetworkSecurityPerimeterClient().BeginReconcileConfiguration(ctx, "default-azurebatch-japaneast", "sampleacct", "00000000-0000-0000-0000-000000000000.sampleassociation", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*NetworkSecurityPerimeterClient) GetConfiguration

func (client *NetworkSecurityPerimeterClient) GetConfiguration(ctx context.Context, resourceGroupName string, accountName string, networkSecurityPerimeterConfigurationName string, options *NetworkSecurityPerimeterClientGetConfigurationOptions) (NetworkSecurityPerimeterClientGetConfigurationResponse, error)

GetConfiguration - Gets information about the specified NSP configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • networkSecurityPerimeterConfigurationName - The name for Network Security Perimeter configuration
  • options - NetworkSecurityPerimeterClientGetConfigurationOptions contains the optional parameters for the NetworkSecurityPerimeterClient.GetConfiguration method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNetworkSecurityPerimeterClient().GetConfiguration(ctx, "default-azurebatch-japaneast", "sampleacct", "00000000-0000-0000-0000-000000000000.sampleassociation", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.NetworkSecurityPerimeterConfiguration = armbatch.NetworkSecurityPerimeterConfiguration{
// 	Name: to.Ptr("00000000-0000-0000-0000-000000000000.sampleassociation"),
// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/networkSecurityPerimeterConfigurations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/networkSecurityPerimeterConfigurations/00000000-0000-0000-0000-000000000000.sampleassociation"),
// 	Properties: &armbatch.NetworkSecurityPerimeterConfigurationProperties{
// 		NetworkSecurityPerimeter: &armbatch.NetworkSecurityPerimeter{
// 			ID: to.Ptr("/subscriptions/perimeterSubscriptionId/resourceGroups/perimeterResourceGroupName/providers/Microsoft.Network/networkSecurityPerimeters/perimeterName"),
// 			Location: to.Ptr("perimeterLocation"),
// 			PerimeterGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 		},
// 		Profile: &armbatch.NetworkSecurityProfile{
// 			Name: to.Ptr("profileName"),
// 			AccessRules: []*armbatch.AccessRule{
// 				{
// 					Name: to.Ptr("accessRule1"),
// 					Properties: &armbatch.AccessRuleProperties{
// 						AddressPrefixes: []*string{
// 							to.Ptr("10.11.0.0/16"),
// 							to.Ptr("10.10.1.0/24")},
// 							Direction: to.Ptr(armbatch.AccessRuleDirectionInbound),
// 							EmailAddresses: []*string{
// 							},
// 							FullyQualifiedDomainNames: []*string{
// 							},
// 							NetworkSecurityPerimeters: []*armbatch.NetworkSecurityPerimeter{
// 							},
// 							PhoneNumbers: []*string{
// 							},
// 							Subscriptions: []*armbatch.AccessRulePropertiesSubscriptionsItem{
// 							},
// 						},
// 					},
// 					{
// 						Name: to.Ptr("accessRule2"),
// 						Properties: &armbatch.AccessRuleProperties{
// 							AddressPrefixes: []*string{
// 							},
// 							Direction: to.Ptr(armbatch.AccessRuleDirectionOutbound),
// 							EmailAddresses: []*string{
// 							},
// 							FullyQualifiedDomainNames: []*string{
// 								to.Ptr("paasrp1.contoso.org"),
// 								to.Ptr("paasrp2.contoso.org")},
// 								NetworkSecurityPerimeters: []*armbatch.NetworkSecurityPerimeter{
// 								},
// 								PhoneNumbers: []*string{
// 								},
// 								Subscriptions: []*armbatch.AccessRulePropertiesSubscriptionsItem{
// 								},
// 							},
// 					}},
// 					AccessRulesVersion: to.Ptr[int32](1),
// 					DiagnosticSettingsVersion: to.Ptr[int32](1),
// 					EnabledLogCategories: []*string{
// 						to.Ptr("logCategory1"),
// 						to.Ptr("logCategory2")},
// 					},
// 					ProvisioningIssues: []*armbatch.ProvisioningIssue{
// 					},
// 					ProvisioningState: to.Ptr(armbatch.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded),
// 					ResourceAssociation: &armbatch.ResourceAssociation{
// 						Name: to.Ptr("sampleassociation"),
// 						AccessMode: to.Ptr(armbatch.ResourceAssociationAccessModeLearning),
// 					},
// 				},
// 			}
Output:

func (*NetworkSecurityPerimeterClient) NewListConfigurationsPager

NewListConfigurationsPager - Lists all of the NSP configurations in the specified account.

Generated from API version 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • options - NetworkSecurityPerimeterClientListConfigurationsOptions contains the optional parameters for the NetworkSecurityPerimeterClient.NewListConfigurationsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNetworkSecurityPerimeterClient().NewListConfigurationsPager("default-azurebatch-japaneast", "sampleacct", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.NetworkSecurityPerimeterConfigurationListResult = armbatch.NetworkSecurityPerimeterConfigurationListResult{
	// 	Value: []*armbatch.NetworkSecurityPerimeterConfiguration{
	// 		{
	// 			Name: to.Ptr("00000000-0000-0000-0000-000000000000.sampleassociation"),
	// 			Type: to.Ptr("Microsoft.Batch/batchAccounts/networkSecurityPerimeterConfigurations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/networkSecurityPerimeterConfigurations/00000000-0000-0000-0000-000000000000.sampleassociation"),
	// 			Properties: &armbatch.NetworkSecurityPerimeterConfigurationProperties{
	// 				NetworkSecurityPerimeter: &armbatch.NetworkSecurityPerimeter{
	// 					ID: to.Ptr("/subscriptions/perimeterSubscriptionId/resourceGroups/perimeterResourceGroupName/providers/Microsoft.Network/networkSecurityPerimeters/perimeterName"),
	// 					Location: to.Ptr("perimeterLocation"),
	// 					PerimeterGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				},
	// 				Profile: &armbatch.NetworkSecurityProfile{
	// 					Name: to.Ptr("profileName"),
	// 					AccessRules: []*armbatch.AccessRule{
	// 						{
	// 							Name: to.Ptr("accessRule1"),
	// 							Properties: &armbatch.AccessRuleProperties{
	// 								AddressPrefixes: []*string{
	// 									to.Ptr("10.11.0.0/16"),
	// 									to.Ptr("10.10.1.0/24")},
	// 									Direction: to.Ptr(armbatch.AccessRuleDirectionInbound),
	// 									EmailAddresses: []*string{
	// 									},
	// 									FullyQualifiedDomainNames: []*string{
	// 									},
	// 									NetworkSecurityPerimeters: []*armbatch.NetworkSecurityPerimeter{
	// 									},
	// 									PhoneNumbers: []*string{
	// 									},
	// 									Subscriptions: []*armbatch.AccessRulePropertiesSubscriptionsItem{
	// 									},
	// 								},
	// 							},
	// 							{
	// 								Name: to.Ptr("accessRule2"),
	// 								Properties: &armbatch.AccessRuleProperties{
	// 									AddressPrefixes: []*string{
	// 									},
	// 									Direction: to.Ptr(armbatch.AccessRuleDirectionOutbound),
	// 									EmailAddresses: []*string{
	// 									},
	// 									FullyQualifiedDomainNames: []*string{
	// 										to.Ptr("paasrp1.contoso.org"),
	// 										to.Ptr("paasrp2.contoso.org")},
	// 										NetworkSecurityPerimeters: []*armbatch.NetworkSecurityPerimeter{
	// 										},
	// 										PhoneNumbers: []*string{
	// 										},
	// 										Subscriptions: []*armbatch.AccessRulePropertiesSubscriptionsItem{
	// 										},
	// 									},
	// 							}},
	// 							AccessRulesVersion: to.Ptr[int32](1),
	// 							DiagnosticSettingsVersion: to.Ptr[int32](1),
	// 							EnabledLogCategories: []*string{
	// 								to.Ptr("logCategory1"),
	// 								to.Ptr("logCategory2")},
	// 							},
	// 							ProvisioningIssues: []*armbatch.ProvisioningIssue{
	// 							},
	// 							ProvisioningState: to.Ptr(armbatch.NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded),
	// 							ResourceAssociation: &armbatch.ResourceAssociation{
	// 								Name: to.Ptr("sampleassociation"),
	// 								AccessMode: to.Ptr(armbatch.ResourceAssociationAccessModeLearning),
	// 							},
	// 						},
	// 				}},
	// 			}
}
Output:

type NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions

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

NetworkSecurityPerimeterClientBeginReconcileConfigurationOptions contains the optional parameters for the NetworkSecurityPerimeterClient.BeginReconcileConfiguration method.

type NetworkSecurityPerimeterClientGetConfigurationOptions

type NetworkSecurityPerimeterClientGetConfigurationOptions struct {
}

NetworkSecurityPerimeterClientGetConfigurationOptions contains the optional parameters for the NetworkSecurityPerimeterClient.GetConfiguration method.

type NetworkSecurityPerimeterClientGetConfigurationResponse

type NetworkSecurityPerimeterClientGetConfigurationResponse struct {
	// Network security perimeter (NSP) configuration resource
	NetworkSecurityPerimeterConfiguration
}

NetworkSecurityPerimeterClientGetConfigurationResponse contains the response from method NetworkSecurityPerimeterClient.GetConfiguration.

type NetworkSecurityPerimeterClientListConfigurationsOptions

type NetworkSecurityPerimeterClientListConfigurationsOptions struct {
}

NetworkSecurityPerimeterClientListConfigurationsOptions contains the optional parameters for the NetworkSecurityPerimeterClient.NewListConfigurationsPager method.

type NetworkSecurityPerimeterClientListConfigurationsResponse

type NetworkSecurityPerimeterClientListConfigurationsResponse struct {
	// Result of a list NSP (network security perimeter) configurations request.
	NetworkSecurityPerimeterConfigurationListResult
}

NetworkSecurityPerimeterClientListConfigurationsResponse contains the response from method NetworkSecurityPerimeterClient.NewListConfigurationsPager.

type NetworkSecurityPerimeterClientReconcileConfigurationResponse

type NetworkSecurityPerimeterClientReconcileConfigurationResponse struct {
}

NetworkSecurityPerimeterClientReconcileConfigurationResponse contains the response from method NetworkSecurityPerimeterClient.BeginReconcileConfiguration.

type NetworkSecurityPerimeterConfiguration

type NetworkSecurityPerimeterConfiguration struct {
	// Network security configuration properties.
	Properties *NetworkSecurityPerimeterConfigurationProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

NetworkSecurityPerimeterConfiguration - Network security perimeter (NSP) configuration resource

func (NetworkSecurityPerimeterConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfiguration.

func (*NetworkSecurityPerimeterConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfiguration.

type NetworkSecurityPerimeterConfigurationListResult

type NetworkSecurityPerimeterConfigurationListResult struct {
	// The link used to get the next page of results.
	NextLink *string

	// Array of network security perimeter results.
	Value []*NetworkSecurityPerimeterConfiguration
}

NetworkSecurityPerimeterConfigurationListResult - Result of a list NSP (network security perimeter) configurations request.

func (NetworkSecurityPerimeterConfigurationListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationListResult.

func (*NetworkSecurityPerimeterConfigurationListResult) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationListResult.

type NetworkSecurityPerimeterConfigurationProperties

type NetworkSecurityPerimeterConfigurationProperties struct {
	// Information about a network security perimeter (NSP)
	NetworkSecurityPerimeter *NetworkSecurityPerimeter

	// Network security perimeter configuration profile
	Profile *NetworkSecurityProfile

	// Information about resource association
	ResourceAssociation *ResourceAssociation

	// READ-ONLY; List of provisioning issues, if any
	ProvisioningIssues []*ProvisioningIssue

	// READ-ONLY; Provisioning state of a network security perimeter configuration that is being created or updated.
	ProvisioningState *NetworkSecurityPerimeterConfigurationProvisioningState
}

NetworkSecurityPerimeterConfigurationProperties - Network security configuration properties.

func (NetworkSecurityPerimeterConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationProperties.

func (*NetworkSecurityPerimeterConfigurationProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityPerimeterConfigurationProperties.

type NetworkSecurityPerimeterConfigurationProvisioningState

type NetworkSecurityPerimeterConfigurationProvisioningState string

NetworkSecurityPerimeterConfigurationProvisioningState - Provisioning state of a network security perimeter configuration that is being created or updated.

const (
	NetworkSecurityPerimeterConfigurationProvisioningStateAccepted  NetworkSecurityPerimeterConfigurationProvisioningState = "Accepted"
	NetworkSecurityPerimeterConfigurationProvisioningStateCanceled  NetworkSecurityPerimeterConfigurationProvisioningState = "Canceled"
	NetworkSecurityPerimeterConfigurationProvisioningStateCreating  NetworkSecurityPerimeterConfigurationProvisioningState = "Creating"
	NetworkSecurityPerimeterConfigurationProvisioningStateDeleting  NetworkSecurityPerimeterConfigurationProvisioningState = "Deleting"
	NetworkSecurityPerimeterConfigurationProvisioningStateFailed    NetworkSecurityPerimeterConfigurationProvisioningState = "Failed"
	NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded NetworkSecurityPerimeterConfigurationProvisioningState = "Succeeded"
	NetworkSecurityPerimeterConfigurationProvisioningStateUpdating  NetworkSecurityPerimeterConfigurationProvisioningState = "Updating"
)

func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues

func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues() []NetworkSecurityPerimeterConfigurationProvisioningState

PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues returns the possible values for the NetworkSecurityPerimeterConfigurationProvisioningState const type.

type NetworkSecurityProfile

type NetworkSecurityProfile struct {
	// List of Access Rules
	AccessRules []*AccessRule

	// Current access rules version
	AccessRulesVersion *int32

	// Current diagnostic settings version
	DiagnosticSettingsVersion *int32

	// List of log categories that are enabled
	EnabledLogCategories []*string

	// Name of the profile
	Name *string
}

NetworkSecurityProfile - Network security perimeter configuration profile

func (NetworkSecurityProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityProfile.

func (*NetworkSecurityProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSecurityProfile.

type NodeCommunicationMode

type NodeCommunicationMode string

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

const (
	// 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"
	// NodeCommunicationModeDefault - The node communication mode is automatically set by the Batch service.
	NodeCommunicationModeDefault NodeCommunicationMode = "Default"
	// 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

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

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

MarshalJSON implements the json.Marshaller interface for type NodePlacementConfiguration.

func (*NodePlacementConfiguration) UnmarshalJSON

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 {
	// The type of caching to enable for the disk.
	Caching *CachingType

	// The initial disk size in GB when creating new OS disk.
	DiskSizeGB *int32

	// Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
	EphemeralOSDiskSettings *DiffDiskSettings
	ManagedDisk             *ManagedDisk

	// Specifies whether writeAccelerator should be enabled or disabled on the disk.
	WriteAcceleratorEnabled *bool
}

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

func (OSDisk) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OSDisk.

func (*OSDisk) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

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

NewListPager - Lists available operations for the Microsoft.Batch provider

Generated from API version 2024-07-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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/OperationsList.json

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

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next
	// set of results.
	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

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

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 (
	// PackageStateActive - The application package is ready for use.
	PackageStateActive PackageState = "Active"
	// PackageStatePending - The application package has been created but has not yet been activated.
	PackageStatePending PackageState = "Pending"
)

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

	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

	// READ-ONLY; The ID of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the resource.
	Type *string
}

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • poolName - The pool name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolDelete.json

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • poolName - The pool name. This must be unique within the account.
  • parameters - Additional parameters for pool creation.
  • options - PoolClientCreateOptions contains the optional parameters for the PoolClient.Create method.
Example (CreatePoolAcceleratedNetworking)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_AcceleratedNetworking.json

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("WindowsServer"),
					Publisher: to.Ptr("MicrosoftWindowsServer"),
					SKU:       to.Ptr("2016-datacenter-smalldisk"),
					Version:   to.Ptr("latest"),
				},
				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
			},
		},
		NetworkConfiguration: &armbatch.NetworkConfiguration{
			EnableAcceleratedNetworking: to.Ptr(true),
			SubnetID:                    to.Ptr("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
		},
		ScaleSettings: &armbatch.ScaleSettings{
			FixedScale: &armbatch.FixedScaleSettings{
				TargetDedicatedNodes:   to.Ptr[int32](1),
				TargetLowPriorityNodes: to.Ptr[int32](0),
			},
		},
		VMSize: to.Ptr("STANDARD_D1_V2"),
	},
}, &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/\"0x8DB46CB72A227E2\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T03:00:34.064Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T02:59:41.859Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](1),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2016-datacenter-smalldisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T02:59:41.859Z"); return t}()),
// 		NetworkConfiguration: &armbatch.NetworkConfiguration{
// 			DynamicVNetAssignmentScope: to.Ptr(armbatch.DynamicVNetAssignmentScopeNone),
// 			EnableAcceleratedNetworking: to.Ptr(true),
// 			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, "2023-04-27T02:59:41.859Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T02:59:41.859Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](1),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](1),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		VMSize: to.Ptr("STANDARD_D1_V2"),
// 	},
// }
Output:

Example (CreatePoolCustomImage)

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

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			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.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		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 (CreatePoolFullVirtualMachineConfiguration)

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

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			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.940Z"); 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.940Z"); 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 (CreatePoolMinimalVirtualMachineConfiguration)

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

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			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.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_NoPublicIPAddresses.json

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			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.940Z"); 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.940Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_PublicIPs.json

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			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.940Z"); 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.940Z"); 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 (CreatePoolResourceTags)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_ResourceTags.json

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-gen2"),
					Version:   to.Ptr("latest"),
				},
				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
			},
		},
		ResourceTags: map[string]*string{
			"TagName1": to.Ptr("TagValue1"),
			"TagName2": to.Ptr("TagValue2"),
		},
		ScaleSettings: &armbatch.ScaleSettings{
			FixedScale: &armbatch.FixedScaleSettings{
				TargetDedicatedNodes:   to.Ptr[int32](1),
				TargetLowPriorityNodes: to.Ptr[int32](0),
			},
		},
		VMSize: to.Ptr("Standard_d4s_v3"),
	},
}, &armbatch.PoolClientCreateOptions{IfMatch: nil,
	IfNoneMatch: nil,
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pool = armbatch.Pool{
// 	Name: to.Ptr("testpool"),
// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// 	Etag: to.Ptr("W/\"0x8DB554F8E08BCF4\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("UbuntuServer"),
// 					Publisher: to.Ptr("Canonical"),
// 					SKU: to.Ptr("18_04-lts-gen2"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-27T07:33:13.062Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](1),
// 		},
// 		ResourceTags: map[string]*string{
// 			"TagName1": to.Ptr("TagValue1"),
// 			"TagName2": to.Ptr("TagValue2"),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](1),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		VMSize: to.Ptr("STANDARD_D4S_V3"),
// 	},
// }
Output:

Example (CreatePoolSecurityProfile)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_SecurityProfile.json

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-gen2"),
					Version:   to.Ptr("latest"),
				},
				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
				SecurityProfile: &armbatch.SecurityProfile{
					EncryptionAtHost: to.Ptr(true),
					SecurityType:     to.Ptr(armbatch.SecurityTypesTrustedLaunch),
					UefiSettings: &armbatch.UefiSettings{
						VTpmEnabled: to.Ptr(false),
					},
				},
			},
		},
		ScaleSettings: &armbatch.ScaleSettings{
			FixedScale: &armbatch.FixedScaleSettings{
				TargetDedicatedNodes:   to.Ptr[int32](1),
				TargetLowPriorityNodes: to.Ptr[int32](0),
			},
		},
		VMSize: to.Ptr("Standard_d4s_v3"),
	},
}, &armbatch.PoolClientCreateOptions{IfMatch: nil,
	IfNoneMatch: nil,
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pool = armbatch.Pool{
// 	Name: to.Ptr("testpool"),
// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// 	Etag: to.Ptr("W/\"0x8DB554F8E08BCF4\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("UbuntuServer"),
// 					Publisher: to.Ptr("Canonical"),
// 					SKU: to.Ptr("18_04-lts-gen2"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// 				SecurityProfile: &armbatch.SecurityProfile{
// 					EncryptionAtHost: to.Ptr(true),
// 					SecurityType: to.Ptr(armbatch.SecurityTypesTrustedLaunch),
// 					UefiSettings: &armbatch.UefiSettings{
// 						VTpmEnabled: to.Ptr(false),
// 					},
// 				},
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](1),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](1),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		VMSize: to.Ptr("STANDARD_D4S_V3"),
// 	},
// }
Output:

Example (CreatePoolTags)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_Tags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
	Tags: map[string]*string{
		"TagName1": to.Ptr("TagValue1"),
		"TagName2": to.Ptr("TagValue2"),
	},
	Properties: &armbatch.PoolProperties{
		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
				ImageReference: &armbatch.ImageReference{
					Offer:     to.Ptr("0001-com-ubuntu-server-jammy"),
					Publisher: to.Ptr("Canonical"),
					SKU:       to.Ptr("22_04-lts"),
					Version:   to.Ptr("latest"),
				},
				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 22.04"),
			},
		},
		ScaleSettings: &armbatch.ScaleSettings{
			FixedScale: &armbatch.FixedScaleSettings{
				TargetDedicatedNodes:   to.Ptr[int32](1),
				TargetLowPriorityNodes: to.Ptr[int32](0),
			},
		},
		VMSize: to.Ptr("Standard_d4s_v3"),
	},
}, &armbatch.PoolClientCreateOptions{IfMatch: nil,
	IfNoneMatch: nil,
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pool = armbatch.Pool{
// 	Name: to.Ptr("testpool"),
// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// 	Etag: to.Ptr("W/\"0x8DB554F8E08BCF4\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Tags: map[string]*string{
// 		"TagName1": to.Ptr("TagValue1"),
// 		"TagName2": to.Ptr("TagValue2"),
// 	},
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("0001-com-ubuntu-server-jammy"),
// 					Publisher: to.Ptr("Canonical"),
// 					SKU: to.Ptr("22_04-lts"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 22.04"),
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-27T07:33:13.062Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](1),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](1),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		VMSize: to.Ptr("STANDARD_D4S_V3"),
// 	},
// }
Output:

Example (CreatePoolUpgradePolicy)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_UpgradePolicy.json

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("WindowsServer"),
					Publisher: to.Ptr("MicrosoftWindowsServer"),
					SKU:       to.Ptr("2019-datacenter-smalldisk"),
					Version:   to.Ptr("latest"),
				},
				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
				NodePlacementConfiguration: &armbatch.NodePlacementConfiguration{
					Policy: to.Ptr(armbatch.NodePlacementPolicyTypeZonal),
				},
				WindowsConfiguration: &armbatch.WindowsConfiguration{
					EnableAutomaticUpdates: to.Ptr(false),
				},
			},
		},
		ScaleSettings: &armbatch.ScaleSettings{
			FixedScale: &armbatch.FixedScaleSettings{
				TargetDedicatedNodes:   to.Ptr[int32](2),
				TargetLowPriorityNodes: to.Ptr[int32](0),
			},
		},
		UpgradePolicy: &armbatch.UpgradePolicy{
			AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
				DisableAutomaticRollback: to.Ptr(true),
				EnableAutomaticOSUpgrade: to.Ptr(true),
				OSRollingUpgradeDeferral: to.Ptr(true),
				UseRollingUpgradePolicy:  to.Ptr(true),
			},
			Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
			RollingUpgradePolicy: &armbatch.RollingUpgradePolicy{
				EnableCrossZoneUpgrade:                to.Ptr(true),
				MaxBatchInstancePercent:               to.Ptr[int32](20),
				MaxUnhealthyInstancePercent:           to.Ptr[int32](20),
				MaxUnhealthyUpgradedInstancePercent:   to.Ptr[int32](20),
				PauseTimeBetweenBatches:               to.Ptr("PT0S"),
				PrioritizeUnhealthyInstances:          to.Ptr(false),
				RollbackFailedInstancesOnPolicyBreach: to.Ptr(false),
			},
		},
		VMSize: to.Ptr("Standard_d4s_v3"),
	},
}, &armbatch.PoolClientCreateOptions{IfMatch: nil,
	IfNoneMatch: nil,
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pool = armbatch.Pool{
// 	Name: to.Ptr("testpool"),
// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// 	Etag: to.Ptr("W/\"0x8DB51E64D3C3B69\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.237Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.237Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2019-datacenter-smalldisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 				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, "2023-05-11T06:16:44.237Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.237Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.237Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](2),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](2),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		UpgradePolicy: &armbatch.UpgradePolicy{
// 			AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
// 				DisableAutomaticRollback: to.Ptr(true),
// 				EnableAutomaticOSUpgrade: to.Ptr(true),
// 				OSRollingUpgradeDeferral: to.Ptr(true),
// 				UseRollingUpgradePolicy: to.Ptr(true),
// 			},
// 			Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
// 			RollingUpgradePolicy: &armbatch.RollingUpgradePolicy{
// 				EnableCrossZoneUpgrade: to.Ptr(true),
// 				MaxBatchInstancePercent: to.Ptr[int32](20),
// 				MaxUnhealthyInstancePercent: to.Ptr[int32](20),
// 				MaxUnhealthyUpgradedInstancePercent: to.Ptr[int32](20),
// 				PauseTimeBetweenBatches: to.Ptr("PT0S"),
// 				PrioritizeUnhealthyInstances: to.Ptr(false),
// 				RollbackFailedInstancesOnPolicyBreach: to.Ptr(false),
// 			},
// 		},
// 		VMSize: to.Ptr("STANDARD_D4S_V3"),
// 	},
// }
Output:

Example (CreatePoolUserAssignedIdentities)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_UserAssignedIdentities.json

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.940Z"); 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.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.940Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json

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("KeyVaultForLinux"),
						AutoUpgradeMinorVersion: to.Ptr(true),
						EnableAutomaticUpgrade:  to.Ptr(true),
						Publisher:               to.Ptr("Microsoft.Azure.KeyVault"),
						Settings: map[string]any{
							"authenticationSettingsKey":    "authenticationSettingsValue",
							"secretsManagementSettingsKey": "secretsManagementSettingsValue",
						},
						TypeHandlerVersion: to.Ptr("2.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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			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("KeyVaultForLinux"),
// 						AutoUpgradeMinorVersion: to.Ptr(true),
// 						EnableAutomaticUpgrade: to.Ptr(true),
// 						Publisher: to.Ptr("Microsoft.Azure.KeyVault"),
// 						Settings: map[string]any{
// 							"authenticationSettingsKey": "authenticationSettingsValue",
// 							"secretsManagementSettingsKey": "secretsManagementSettingsValue",
// 						},
// 						TypeHandlerVersion: to.Ptr("2.0"),
// 				}},
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		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:

Example (CreatePoolVirtualMachineConfigurationOsDisk)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json

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("windowsserver"),
					Publisher: to.Ptr("microsoftwindowsserver"),
					SKU:       to.Ptr("2022-datacenter-smalldisk"),
				},
				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
				OSDisk: &armbatch.OSDisk{
					Caching:    to.Ptr(armbatch.CachingTypeReadWrite),
					DiskSizeGB: to.Ptr[int32](100),
					ManagedDisk: &armbatch.ManagedDisk{
						StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS),
					},
					WriteAcceleratorEnabled: to.Ptr(false),
				},
			},
		},
		ScaleSettings: &armbatch.ScaleSettings{
			FixedScale: &armbatch.FixedScaleSettings{
				TargetDedicatedNodes:   to.Ptr[int32](1),
				TargetLowPriorityNodes: to.Ptr[int32](0),
			},
		},
		VMSize: to.Ptr("Standard_d2s_v3"),
	},
}, &armbatch.PoolClientCreateOptions{IfMatch: nil,
	IfNoneMatch: nil,
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pool = armbatch.Pool{
// 	Name: to.Ptr("testpool"),
// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// 	Etag: to.Ptr("W/\"0x8DB51F396992B8D\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("windowsserver"),
// 					Publisher: to.Ptr("microsoftwindowsserver"),
// 					SKU: to.Ptr("2022-datacenter-smalldisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 				OSDisk: &armbatch.OSDisk{
// 					Caching: to.Ptr(armbatch.CachingTypeReadWrite),
// 					DiskSizeGB: to.Ptr[int32](100),
// 					ManagedDisk: &armbatch.ManagedDisk{
// 						StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS),
// 					},
// 					WriteAcceleratorEnabled: to.Ptr(false),
// 				},
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](1),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](1),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		VMSize: to.Ptr("STANDARD_D2_V3"),
// 	},
// }
Output:

Example (CreatePoolVirtualMachineConfigurationServiceArtifactReference)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json

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("WindowsServer"),
					Publisher: to.Ptr("MicrosoftWindowsServer"),
					SKU:       to.Ptr("2019-datacenter-smalldisk"),
					Version:   to.Ptr("latest"),
				},
				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
				ServiceArtifactReference: &armbatch.ServiceArtifactReference{
					ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"),
				},
				WindowsConfiguration: &armbatch.WindowsConfiguration{
					EnableAutomaticUpdates: to.Ptr(false),
				},
			},
		},
		ScaleSettings: &armbatch.ScaleSettings{
			FixedScale: &armbatch.FixedScaleSettings{
				TargetDedicatedNodes:   to.Ptr[int32](2),
				TargetLowPriorityNodes: to.Ptr[int32](0),
			},
		},
		UpgradePolicy: &armbatch.UpgradePolicy{
			AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
				EnableAutomaticOSUpgrade: to.Ptr(true),
			},
			Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
		},
		VMSize: to.Ptr("Standard_d4s_v3"),
	},
}, &armbatch.PoolClientCreateOptions{IfMatch: nil,
	IfNoneMatch: nil,
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Pool = armbatch.Pool{
// 	Name: to.Ptr("mypool41"),
// 	Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// 	Etag: to.Ptr("W/\"0x8DB51F396992B8D\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2019-datacenter-smalldisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 				ServiceArtifactReference: &armbatch.ServiceArtifactReference{
// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"),
// 				},
// 				WindowsConfiguration: &armbatch.WindowsConfiguration{
// 					EnableAutomaticUpdates: to.Ptr(false),
// 				},
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](2),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](2),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		UpgradePolicy: &armbatch.UpgradePolicy{
// 			AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
// 				EnableAutomaticOSUpgrade: to.Ptr(true),
// 			},
// 			Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
// 		},
// 		VMSize: to.Ptr("STANDARD_D4S_V3"),
// 	},
// }
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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • poolName - The pool name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolDisableAutoScale.json

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			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.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • poolName - The pool name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet.json

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.940Z"); return t}()),
// 		ApplicationLicenses: []*string{
// 			to.Ptr("app-license0"),
// 			to.Ptr("app-license1")},
// 			ApplicationPackages: []*armbatch.ApplicationPackageReference{
// 				{
// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"),
// 					Version: to.Ptr("asdf"),
// 			}},
// 			Certificates: []*armbatch.CertificateReference{
// 				{
// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567"),
// 					StoreLocation: to.Ptr(armbatch.CertificateStoreLocationLocalMachine),
// 					StoreName: to.Ptr("MY"),
// 					Visibility: []*armbatch.CertificateVisibility{
// 						to.Ptr(armbatch.CertificateVisibilityRemoteUser)},
// 				}},
// 				CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 				CurrentDedicatedNodes: to.Ptr[int32](0),
// 				CurrentLowPriorityNodes: to.Ptr[int32](0),
// 				DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 					VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 						ImageReference: &armbatch.ImageReference{
// 							Offer: to.Ptr("WindowsServer"),
// 							Publisher: to.Ptr("MicrosoftWindowsServer"),
// 							SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// 							Version: to.Ptr("latest"),
// 						},
// 						NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 					},
// 				},
// 				InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateEnabled),
// 				LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 				Metadata: []*armbatch.MetadataItem{
// 					{
// 						Name: to.Ptr("metadata-1"),
// 						Value: to.Ptr("value-1"),
// 					},
// 					{
// 						Name: to.Ptr("metadata-2"),
// 						Value: to.Ptr("value-2"),
// 				}},
// 				NetworkConfiguration: &armbatch.NetworkConfiguration{
// 					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.940Z"); 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.940Z"); 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 (GetPoolAcceleratedNetworking)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_AcceleratedNetworking.json

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.AllocationStateSteady),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-28T02:33:40.828Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-28T02:32:32.869Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](1),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2016-datacenter-smalldisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-28T02:32:32.869Z"); return t}()),
// 		NetworkConfiguration: &armbatch.NetworkConfiguration{
// 			DynamicVNetAssignmentScope: to.Ptr(armbatch.DynamicVNetAssignmentScopeNone),
// 			EnableAcceleratedNetworking: to.Ptr(true),
// 		},
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-28T02:32:32.869Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-28T02:32:32.869Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](1),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](1),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		VMSize: to.Ptr("STANDARD_D1_V2"),
// 	},
// }
Output:

Example (GetPoolSecurityProfile)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_SecurityProfile.json

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/\"0x8DB554F8E08BCF4\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:04:57.341Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](1),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("UbuntuServer"),
// 					Publisher: to.Ptr("Canonical"),
// 					SKU: to.Ptr("18_04-lts-gen2"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// 				SecurityProfile: &armbatch.SecurityProfile{
// 					EncryptionAtHost: to.Ptr(true),
// 					SecurityType: to.Ptr(armbatch.SecurityTypesTrustedLaunch),
// 					UefiSettings: &armbatch.UefiSettings{
// 						VTpmEnabled: to.Ptr(false),
// 					},
// 				},
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.323Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](1),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](1),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		VMSize: to.Ptr("STANDARD_D4S_V3"),
// 	},
// }
Output:

Example (GetPoolUpgradePolicy)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_UpgradePolicy.json

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/\"0x8DB51E64D3C3B69\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:10:31.467Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:09:38.317Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](2),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2019-datacenter-smalldisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 				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, "2023-05-11T06:09:38.317Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:09:38.317Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:09:38.317Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](2),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](2),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		UpgradePolicy: &armbatch.UpgradePolicy{
// 			AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
// 				DisableAutomaticRollback: to.Ptr(true),
// 				EnableAutomaticOSUpgrade: to.Ptr(true),
// 				OSRollingUpgradeDeferral: to.Ptr(true),
// 				UseRollingUpgradePolicy: to.Ptr(true),
// 			},
// 			Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
// 			RollingUpgradePolicy: &armbatch.RollingUpgradePolicy{
// 				EnableCrossZoneUpgrade: to.Ptr(true),
// 				MaxBatchInstancePercent: to.Ptr[int32](20),
// 				MaxUnhealthyInstancePercent: to.Ptr[int32](20),
// 				MaxUnhealthyUpgradedInstancePercent: to.Ptr[int32](20),
// 				PauseTimeBetweenBatches: to.Ptr("PT0S"),
// 				PrioritizeUnhealthyInstances: to.Ptr(false),
// 				RollbackFailedInstancesOnPolicyBreach: to.Ptr(false),
// 			},
// 		},
// 		VMSize: to.Ptr("STANDARD_D4S_V3"),
// 	},
// }
Output:

Example (GetPoolVirtualMachineConfigurationExtensions)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		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("KeyVaultForLinux"),
// 						AutoUpgradeMinorVersion: to.Ptr(true),
// 						EnableAutomaticUpgrade: to.Ptr(true),
// 						Publisher: to.Ptr("Microsoft.Azure.KeyVault"),
// 						Settings: map[string]any{
// 							"authenticationSettingsKey": "authenticationSettingsValue",
// 							"secretsManagementSettingsKey": "secretsManagementSettingsValue",
// 						},
// 						TypeHandlerVersion: to.Ptr("2.0"),
// 				}},
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateEnabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
// 			ResizeTimeout: to.Ptr("PT8M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); 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:

Example (GetPoolVirtualMachineConfigurationOsDisk)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_VirtualMachineConfiguration_MangedOSDisk.json

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/\"0x8DB51E64D3C3B69\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:13:22.488Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](1),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("windowsserver"),
// 					Publisher: to.Ptr("microsoftwindowsserver"),
// 					SKU: to.Ptr("2022-datacenter-smalldisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 				OSDisk: &armbatch.OSDisk{
// 					Caching: to.Ptr(armbatch.CachingTypeReadWrite),
// 					DiskSizeGB: to.Ptr[int32](100),
// 					ManagedDisk: &armbatch.ManagedDisk{
// 						StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS),
// 					},
// 					WriteAcceleratorEnabled: to.Ptr(false),
// 				},
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.752Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](1),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](1),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		VMSize: to.Ptr("STANDARD_D2_V3"),
// 	},
// }
Output:

Example (GetPoolVirtualMachineConfigurationServiceArtifactReference)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json

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/\"0x8DB51E64D3C3B69\""),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// 	Properties: &armbatch.PoolProperties{
// 		AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// 		AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:45:42.088Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](2),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		CurrentNodeCommunicationMode: to.Ptr(armbatch.NodeCommunicationModeClassic),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2019-datacenter-smalldisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 				ServiceArtifactReference: &armbatch.ServiceArtifactReference{
// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"),
// 				},
// 				WindowsConfiguration: &armbatch.WindowsConfiguration{
// 					EnableAutomaticUpdates: to.Ptr(false),
// 				},
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.858Z"); return t}()),
// 			TargetDedicatedNodes: to.Ptr[int32](2),
// 		},
// 		ScaleSettings: &armbatch.ScaleSettings{
// 			FixedScale: &armbatch.FixedScaleSettings{
// 				ResizeTimeout: to.Ptr("PT15M"),
// 				TargetDedicatedNodes: to.Ptr[int32](2),
// 				TargetLowPriorityNodes: to.Ptr[int32](0),
// 			},
// 		},
// 		TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// 			NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// 		},
// 		TaskSlotsPerNode: to.Ptr[int32](1),
// 		UpgradePolicy: &armbatch.UpgradePolicy{
// 			AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
// 				EnableAutomaticOSUpgrade: to.Ptr(true),
// 			},
// 			Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
// 		},
// 		VMSize: to.Ptr("STANDARD_D4S_V3"),
// 	},
// }
Output:

func (*PoolClient) NewListByBatchAccountPager

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • options - PoolClientListByBatchAccountOptions contains the optional parameters for the PoolClient.NewListByBatchAccountPager method.
Example (ListPool)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolList.json

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.940Z"); return t}()),
	// 				ApplicationLicenses: []*string{
	// 					to.Ptr("app-license0"),
	// 					to.Ptr("app-license1")},
	// 					ApplicationPackages: []*armbatch.ApplicationPackageReference{
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"),
	// 							Version: to.Ptr("asdf"),
	// 					}},
	// 					Certificates: []*armbatch.CertificateReference{
	// 						{
	// 							ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567"),
	// 							StoreLocation: to.Ptr(armbatch.CertificateStoreLocationLocalMachine),
	// 							StoreName: to.Ptr("MY"),
	// 							Visibility: []*armbatch.CertificateVisibility{
	// 								to.Ptr(armbatch.CertificateVisibilityRemoteUser)},
	// 						}},
	// 						CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
	// 						CurrentDedicatedNodes: to.Ptr[int32](0),
	// 						CurrentLowPriorityNodes: to.Ptr[int32](0),
	// 						DeploymentConfiguration: &armbatch.DeploymentConfiguration{
	// 							VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
	// 								ImageReference: &armbatch.ImageReference{
	// 									Offer: to.Ptr("WindowsServer"),
	// 									Publisher: to.Ptr("MicrosoftWindowsServer"),
	// 									SKU: to.Ptr("2016-Datacenter-SmallDisk"),
	// 									Version: to.Ptr("latest"),
	// 								},
	// 								NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
	// 							},
	// 						},
	// 						InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateEnabled),
	// 						LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
	// 						Metadata: []*armbatch.MetadataItem{
	// 							{
	// 								Name: to.Ptr("metadata-1"),
	// 								Value: to.Ptr("value-1"),
	// 							},
	// 							{
	// 								Name: to.Ptr("metadata-2"),
	// 								Value: to.Ptr("value-2"),
	// 						}},
	// 						NetworkConfiguration: &armbatch.NetworkConfiguration{
	// 							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.940Z"); 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.940Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolListWithFilter.json

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.940Z"); 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.940Z"); 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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • poolName - The pool name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolStopResize.json

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.940Z"); return t}()),
// 		CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](0),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			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.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT10M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); 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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • poolName - The pool name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_EnableAutoScale.json

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.940Z"); return t}()),
// 		AutoScaleRun: &armbatch.AutoScaleRun{
// 			EvaluationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); 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.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](12),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_OtherProperties.json

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.940Z"); 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.940Z"); 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.940Z"); return t}()),
// 			CurrentDedicatedNodes: to.Ptr[int32](12),
// 			CurrentLowPriorityNodes: to.Ptr[int32](0),
// 			DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 				VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 					ImageReference: &armbatch.ImageReference{
// 						Offer: to.Ptr("WindowsServer"),
// 						Publisher: to.Ptr("MicrosoftWindowsServer"),
// 						SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// 						Version: to.Ptr("latest"),
// 					},
// 					NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 				},
// 			},
// 			InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 			LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); 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.940Z"); 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.940Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_RemoveStartTask.json

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.940Z"); return t}()),
// 		AutoScaleRun: &armbatch.AutoScaleRun{
// 			EvaluationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); 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.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](12),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// 			ResizeTimeout: to.Ptr("PT15M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_ResizePool.json

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.940Z"); return t}()),
// 		AutoScaleRun: &armbatch.AutoScaleRun{
// 			EvaluationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); 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.940Z"); return t}()),
// 		CurrentDedicatedNodes: to.Ptr[int32](12),
// 		CurrentLowPriorityNodes: to.Ptr[int32](0),
// 		DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// 			VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// 				ImageReference: &armbatch.ImageReference{
// 					Offer: to.Ptr("WindowsServer"),
// 					Publisher: to.Ptr("MicrosoftWindowsServer"),
// 					SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// 					Version: to.Ptr("latest"),
// 				},
// 				NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// 			},
// 		},
// 		InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// 		LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); return t}()),
// 		ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// 		ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.940Z"); return t}()),
// 		ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// 			NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionTaskCompletion),
// 			ResizeTimeout: to.Ptr("PT8M"),
// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-29T10:22:55.940Z"); 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

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

PoolClientBeginDeleteOptions contains the optional parameters for the PoolClient.BeginDelete method.

type PoolClientCreateOptions

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

type PoolClientCreateResponse struct {
	// Contains information about a pool.
	Pool

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientCreateResponse contains the response from method PoolClient.Create.

type PoolClientDeleteResponse

type PoolClientDeleteResponse struct {
}

PoolClientDeleteResponse contains the response from method PoolClient.BeginDelete.

type PoolClientDisableAutoScaleOptions

type PoolClientDisableAutoScaleOptions struct {
}

PoolClientDisableAutoScaleOptions contains the optional parameters for the PoolClient.DisableAutoScale method.

type PoolClientDisableAutoScaleResponse

type PoolClientDisableAutoScaleResponse struct {
	// Contains information about a pool.
	Pool

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientDisableAutoScaleResponse contains the response from method PoolClient.DisableAutoScale.

type PoolClientGetOptions

type PoolClientGetOptions struct {
}

PoolClientGetOptions contains the optional parameters for the PoolClient.Get method.

type PoolClientGetResponse

type PoolClientGetResponse struct {
	// Contains information about a pool.
	Pool

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientGetResponse contains the response from method PoolClient.Get.

type PoolClientListByBatchAccountOptions

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

type PoolClientListByBatchAccountResponse struct {
	// Values returned by the List operation.
	ListPoolsResult
}

PoolClientListByBatchAccountResponse contains the response from method PoolClient.NewListByBatchAccountPager.

type PoolClientStopResizeOptions

type PoolClientStopResizeOptions struct {
}

PoolClientStopResizeOptions contains the optional parameters for the PoolClient.StopResize method.

type PoolClientStopResizeResponse

type PoolClientStopResizeResponse struct {
	// Contains information about a pool.
	Pool

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PoolClientStopResizeResponse contains the response from method PoolClient.StopResize.

type PoolClientUpdateOptions

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

type PoolClientUpdateResponse struct {
	// Contains information about a pool.
	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

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

UnmarshalJSON implements the json.Unmarshaller interface for type PoolEndpointConfiguration.

type PoolIdentity

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

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

MarshalJSON implements the json.Marshaller interface for type PoolIdentity.

func (*PoolIdentity) UnmarshalJSON

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 (
	// PoolIdentityTypeNone - Batch pool has no identity associated with it. Setting `None` in update pool will remove existing
	// identities.
	PoolIdentityTypeNone PoolIdentityType = "None"
	// PoolIdentityTypeUserAssigned - Batch pool has user assigned identities with it.
	PoolIdentityTypeUserAssigned PoolIdentityType = "UserAssigned"
)

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

	// Deployment configuration properties.
	DeploymentConfiguration *DeploymentConfiguration

	// The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
	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

	// The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing
	// Azure resources associated with the pool. This property can only be specified
	// when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.
	ResourceTags map[string]*string

	// Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified,
	// or 'autoScale' which defines a formula which is periodically reevaluated.
	// If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.
	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

	// Describes an upgrade policy - automatic, manual, or rolling.
	UpgradePolicy *UpgradePolicy

	// The list of user accounts to be created on each node in the pool.
	UserAccounts []*UserAccount

	// For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/)
	// or Sizes for Virtual Machines
	// (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure
	// VM sizes except STANDARDA0 and those with premium storage (STANDARDGS, STANDARD
	// DS, and STANDARDDSV2 series).
	VMSize *string

	// READ-ONLY; Whether the pool is resizing.
	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 (
	// PoolProvisioningStateDeleting - The user has requested that the pool be deleted, but the delete operation has not yet completed.
	PoolProvisioningStateDeleting PoolProvisioningState = "Deleting"
	// PoolProvisioningStateSucceeded - The pool is available to run tasks subject to the availability of compute nodes.
	PoolProvisioningStateSucceeded PoolProvisioningState = "Succeeded"
)

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

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON

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

	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

	// READ-ONLY; The ID of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the resource.
	Type *string
}

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

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionDelete.json

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionUpdate.json

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • privateEndpointConnectionName - The private endpoint connection name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionGet.json

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

NewListByBatchAccountPager - Lists all of the private endpoint connections in the specified account.

Generated from API version 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • options - PrivateEndpointConnectionClientListByBatchAccountOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByBatchAccountPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionsList.json

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

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

PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete method.

type PrivateEndpointConnectionClientBeginUpdateOptions

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

type PrivateEndpointConnectionClientDeleteResponse struct {
}

PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.BeginDelete.

type PrivateEndpointConnectionClientGetOptions

type PrivateEndpointConnectionClientGetOptions struct {
}

PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get method.

type PrivateEndpointConnectionClientGetResponse

type PrivateEndpointConnectionClientGetResponse struct {
	// Contains information about a private link resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionClientGetResponse contains the response from method PrivateEndpointConnectionClient.Get.

type PrivateEndpointConnectionClientListByBatchAccountOptions

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

type PrivateEndpointConnectionClientListByBatchAccountResponse struct {
	// Values returned by the List operation.
	ListPrivateEndpointConnectionsResult
}

PrivateEndpointConnectionClientListByBatchAccountResponse contains the response from method PrivateEndpointConnectionClient.NewListByBatchAccountPager.

type PrivateEndpointConnectionClientUpdateResponse

type PrivateEndpointConnectionClientUpdateResponse struct {
	// Contains information about a private link resource.
	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

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON

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 (
	// PrivateEndpointConnectionProvisioningStateCancelled - The user has cancelled the connection creation.
	PrivateEndpointConnectionProvisioningStateCancelled PrivateEndpointConnectionProvisioningState = "Cancelled"
	// PrivateEndpointConnectionProvisioningStateCreating - The connection is creating.
	PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating"
	// PrivateEndpointConnectionProvisioningStateDeleting - The connection is deleting.
	PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting"
	// PrivateEndpointConnectionProvisioningStateFailed - The user requested that the connection be updated and it failed. You
	// may retry the update operation.
	PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed"
	// PrivateEndpointConnectionProvisioningStateSucceeded - The connection status is final and is ready for use if Status is
	// Approved.
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
	// 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"
)

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

	// The tags of the resource.
	Tags map[string]*string

	// READ-ONLY; The ETag of the resource, used for concurrency statements.
	Etag *string

	// READ-ONLY; The ID of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the resource.
	Type *string
}

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

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 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • privateLinkResourceName - The private link resource name. This must be unique within the account.
  • 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/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateLinkResourceGet.json

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

NewListByBatchAccountPager - Lists all of the private link resources in the specified account.

Generated from API version 2024-07-01

  • resourceGroupName - The name of the resource group that contains the Batch account.
  • accountName - The name of the Batch account.
  • options - PrivateLinkResourceClientListByBatchAccountOptions contains the optional parameters for the PrivateLinkResourceClient.NewListByBatchAccountPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateLinkResourcesList.json

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

type PrivateLinkResourceClientGetOptions struct {
}

PrivateLinkResourceClientGetOptions contains the optional parameters for the PrivateLinkResourceClient.Get method.

type PrivateLinkResourceClientGetResponse

type PrivateLinkResourceClientGetResponse struct {
	// Contains information about a private link resource.
	PrivateLinkResource
}

PrivateLinkResourceClientGetResponse contains the response from method PrivateLinkResourceClient.Get.

type PrivateLinkResourceClientListByBatchAccountOptions

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

type PrivateLinkResourceClientListByBatchAccountResponse struct {
	// Values returned by the List operation.
	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

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

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON

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"
	// PrivateLinkServiceConnectionStatusDisconnected - The private endpoint connection is disconnected and cannot be used to
	// access Batch account
	PrivateLinkServiceConnectionStatusDisconnected PrivateLinkServiceConnectionStatus = "Disconnected"
	// 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"
)

func PossiblePrivateLinkServiceConnectionStatusValues

func PossiblePrivateLinkServiceConnectionStatusValues() []PrivateLinkServiceConnectionStatus

PossiblePrivateLinkServiceConnectionStatusValues returns the possible values for the PrivateLinkServiceConnectionStatus const type.

type ProvisioningIssue

type ProvisioningIssue struct {
	// READ-ONLY; Name of the issue
	Name *string

	// READ-ONLY; Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should
	// generate separate provisioning issue elements for each separate issue detected, and
	// include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules
	Properties *ProvisioningIssueProperties
}

ProvisioningIssue - Describes a provisioning issue for a network security perimeter configuration

func (ProvisioningIssue) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProvisioningIssue.

func (*ProvisioningIssue) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssue.

type ProvisioningIssueProperties

type ProvisioningIssueProperties struct {
	// READ-ONLY; Description of the issue
	Description *string

	// READ-ONLY; Type of issue
	IssueType *IssueType

	// READ-ONLY; Severity of the issue.
	Severity *Severity

	// READ-ONLY; Access rules that can be added to the network security profile (NSP) to remediate the issue.
	SuggestedAccessRules []*AccessRule

	// READ-ONLY; Fully qualified resource IDs of suggested resources that can be associated to the network security perimeter
	// (NSP) to remediate the issue.
	SuggestedResourceIDs []*string
}

ProvisioningIssueProperties - Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should generate separate provisioning issue elements for each separate issue detected, and include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules

func (ProvisioningIssueProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProvisioningIssueProperties.

func (*ProvisioningIssueProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningIssueProperties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The provisioned state of the resource

const (
	// ProvisioningStateCancelled - The last operation for the account is cancelled.
	ProvisioningStateCancelled ProvisioningState = "Cancelled"
	// ProvisioningStateCreating - The account is being created.
	ProvisioningStateCreating ProvisioningState = "Creating"
	// ProvisioningStateDeleting - The account is being deleted.
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateFailed - The last operation for the account is failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateInvalid - The account is in an invalid state.
	ProvisioningStateInvalid ProvisioningState = "Invalid"
	// ProvisioningStateSucceeded - The account has been created and is ready for use.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

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

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 (
	// PublicNetworkAccessTypeDisabled - Disables public connectivity and enables private connectivity to Azure Batch Service
	// through private endpoint resource.
	PublicNetworkAccessTypeDisabled PublicNetworkAccessType = "Disabled"
	// PublicNetworkAccessTypeEnabled - Enables connectivity to Azure Batch through public DNS.
	PublicNetworkAccessTypeEnabled PublicNetworkAccessType = "Enabled"
	// PublicNetworkAccessTypeSecuredByPerimeter - Secures connectivity to Azure Batch through NSP configuration.
	PublicNetworkAccessTypeSecuredByPerimeter PublicNetworkAccessType = "SecuredByPerimeter"
)

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

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; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceAssociation

type ResourceAssociation struct {
	// Access mode of the resource association
	AccessMode *ResourceAssociationAccessMode

	// Name of the resource association
	Name *string
}

ResourceAssociation - Information about resource association

func (ResourceAssociation) MarshalJSON

func (r ResourceAssociation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceAssociation.

func (*ResourceAssociation) UnmarshalJSON

func (r *ResourceAssociation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceAssociation.

type ResourceAssociationAccessMode

type ResourceAssociationAccessMode string

ResourceAssociationAccessMode - Access mode of the resource association

const (
	// ResourceAssociationAccessModeAudit - Audit access mode - traffic to the resource that fails access checks is logged but
	// not blocked
	ResourceAssociationAccessModeAudit ResourceAssociationAccessMode = "Audit"
	// ResourceAssociationAccessModeEnforced - Enforced access mode - traffic to the resource that failed access checks is blocked
	ResourceAssociationAccessModeEnforced ResourceAssociationAccessMode = "Enforced"
	// ResourceAssociationAccessModeLearning - Learning access mode - traffic to the resource is enabled for analysis but not
	// blocked
	ResourceAssociationAccessModeLearning ResourceAssociationAccessMode = "Learning"
)

func PossibleResourceAssociationAccessModeValues

func PossibleResourceAssociationAccessModeValues() []ResourceAssociationAccessMode

PossibleResourceAssociationAccessModeValues returns the possible values for the ResourceAssociationAccessMode const type.

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

func (r ResourceFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceFile.

func (*ResourceFile) UnmarshalJSON

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 (
	// ResourceIdentityTypeNone - Batch account has no identity associated with it. Setting `None` in update account will remove
	// existing identities.
	ResourceIdentityTypeNone ResourceIdentityType = "None"
	// 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"
)

func PossibleResourceIdentityTypeValues

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.

type RollingUpgradePolicy

type RollingUpgradePolicy struct {
	// Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent
	// to determine the batch size. If this field is not set, Azure
	// Azure Batch will not set its default value. The value of enableCrossZoneUpgrade on the created VirtualMachineScaleSet will
	// be decided by the default configurations on VirtualMachineScaleSet. This
	// field is able to be set to true or false only when using NodePlacementConfiguration as Zonal.
	EnableCrossZoneUpgrade *bool

	// The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one
	// batch. As this is a maximum, unhealthy instances in previous or future batches
	// can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should
	// be between 5 and 100, inclusive. If both maxBatchInstancePercent and
	// maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.
	MaxBatchInstancePercent *int32

	// The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either
	// as a result of being upgraded, or by being found in an unhealthy state by
	// the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting
	// any batch. The value of this field should be between 5 and 100, inclusive. If
	// both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent
	// should not be more than maxUnhealthyInstancePercent.
	MaxUnhealthyInstancePercent *int32

	// The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check
	// will happen after each batch is upgraded. If this percentage is ever exceeded,
	// the rolling update aborts. The value of this field should be between 0 and 100, inclusive.
	MaxUnhealthyUpgradedInstancePercent *int32

	// The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time
	// duration should be specified in ISO 8601 format.
	PauseTimeBetweenBatches *string

	// Upgrade all unhealthy instances in a scale set before any healthy instances.
	PrioritizeUnhealthyInstances *bool

	// Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
	RollbackFailedInstancesOnPolicyBreach *bool
}

RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.

func (RollingUpgradePolicy) MarshalJSON

func (r RollingUpgradePolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RollingUpgradePolicy.

func (*RollingUpgradePolicy) UnmarshalJSON

func (r *RollingUpgradePolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RollingUpgradePolicy.

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

func (s SKUCapability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUCapability.

func (*SKUCapability) UnmarshalJSON

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

func (s ScaleSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScaleSettings.

func (*ScaleSettings) UnmarshalJSON

func (s *ScaleSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScaleSettings.

type SecurityEncryptionTypes

type SecurityEncryptionTypes string

SecurityEncryptionTypes - Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob. Note: It can be set for only Confidential VMs and required when using Confidential VMs.

const (
	SecurityEncryptionTypesNonPersistedTPM  SecurityEncryptionTypes = "NonPersistedTPM"
	SecurityEncryptionTypesVMGuestStateOnly SecurityEncryptionTypes = "VMGuestStateOnly"
)

func PossibleSecurityEncryptionTypesValues

func PossibleSecurityEncryptionTypesValues() []SecurityEncryptionTypes

PossibleSecurityEncryptionTypesValues returns the possible values for the SecurityEncryptionTypes const type.

type SecurityProfile

type SecurityProfile struct {
	// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual
	// machine scale set. This will enable the encryption for all the disks
	// including Resource/Temp disk at host itself.
	EncryptionAtHost *bool

	// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.
	SecurityType *SecurityTypes

	// Specifies the security settings like secure boot and vTPM used while creating the virtual machine.
	UefiSettings *UefiSettings
}

SecurityProfile - Specifies the security profile settings for the virtual machine or virtual machine scale set.

func (SecurityProfile) MarshalJSON

func (s SecurityProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecurityProfile.

func (*SecurityProfile) UnmarshalJSON

func (s *SecurityProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecurityProfile.

type SecurityTypes

type SecurityTypes string

SecurityTypes - Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.

const (
	// SecurityTypesConfidentialVM - Azure confidential computing offers confidential VMs are for tenants with high security and
	// confidentiality requirements. These VMs provide a strong, hardware-enforced boundary to help meet your security needs.
	// You can use confidential VMs for migrations without making changes to your code, with the platform protecting your VM's
	// state from being read or modified.
	SecurityTypesConfidentialVM SecurityTypes = "confidentialVM"
	// SecurityTypesTrustedLaunch - Trusted launch protects against advanced and persistent attack techniques.
	SecurityTypesTrustedLaunch SecurityTypes = "trustedLaunch"
)

func PossibleSecurityTypesValues

func PossibleSecurityTypesValues() []SecurityTypes

PossibleSecurityTypesValues returns the possible values for the SecurityTypes const type.

type ServiceArtifactReference

type ServiceArtifactReference struct {
	// REQUIRED; The service artifact reference id in the form of
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}
	ID *string
}

ServiceArtifactReference - Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version.

func (ServiceArtifactReference) MarshalJSON

func (s ServiceArtifactReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceArtifactReference.

func (*ServiceArtifactReference) UnmarshalJSON

func (s *ServiceArtifactReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceArtifactReference.

type Severity

type Severity string

Severity - Severity of the issue.

const (
	SeverityError   Severity = "Error"
	SeverityWarning Severity = "Warning"
)

func PossibleSeverityValues

func PossibleSeverityValues() []Severity

PossibleSeverityValues returns the possible values for the Severity const type.

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. Default is 0
	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

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 or OS disk.

const (
	// StorageAccountTypePremiumLRS - The data disk / OS disk should use premium locally redundant storage.
	StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS"
	// StorageAccountTypeStandardLRS - The data disk / OS disk should use standard locally redundant storage.
	StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS"
	// StorageAccountTypeStandardSSDLRS - The data disk / OS disk should use standard SSD locally redundant storage.
	StorageAccountTypeStandardSSDLRS StorageAccountType = "StandardSSD_LRS"
)

func PossibleStorageAccountTypeValues

func PossibleStorageAccountTypeValues() []StorageAccountType

PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type.

type SupportedSKU

type SupportedSKU struct {
	// READ-ONLY; The time when Azure Batch service will retire this SKU.
	BatchSupportEndOfLife *time.Time

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

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

func (s *SupportedSKUsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedSKUsResult.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

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

	// If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZBATCHNODEROOTDIR
	// in Linux). It won't' mount any data paths into container if this array
	// is set as empty.
	ContainerHostBatchBindMounts []*ContainerHostBatchBindMountEntry

	// These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the
	// Batch Service.
	ContainerRunOptions *string

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

func (t TaskContainerSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TaskContainerSettings.

func (*TaskContainerSettings) UnmarshalJSON

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

func (t TaskSchedulingPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TaskSchedulingPolicy.

func (*TaskSchedulingPolicy) UnmarshalJSON

func (t *TaskSchedulingPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TaskSchedulingPolicy.

type UefiSettings

type UefiSettings struct {
	// Specifies whether secure boot should be enabled on the virtual machine.
	SecureBootEnabled *bool

	// Specifies whether vTPM should be enabled on the virtual machine.
	VTpmEnabled *bool
}

UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine.

func (UefiSettings) MarshalJSON

func (u UefiSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UefiSettings.

func (*UefiSettings) UnmarshalJSON

func (u *UefiSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UefiSettings.

type UpgradeMode

type UpgradeMode string

UpgradeMode - Specifies the mode of an upgrade to virtual machines in the scale set. Possible values are: Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. Automatic - All virtual machines in the scale set are automatically updated at the same time. Rolling - Scale set performs updates in batches with an optional pause time in between.

const (
	// UpgradeModeAutomatic - All virtual machines in the scale set are automatically updated at the same time.
	UpgradeModeAutomatic UpgradeMode = "automatic"
	// UpgradeModeManual - You control the application of updates to virtual machines in the scale set. You do this by using the
	// manualUpgrade action.
	UpgradeModeManual UpgradeMode = "manual"
	// UpgradeModeRolling - The existing instances in a scale set are brought down in batches to be upgraded. Once the upgraded
	// batch is complete, the instances will begin taking traffic again and the next batch will begin. This continues until all
	// instances brought up-to-date.
	UpgradeModeRolling UpgradeMode = "rolling"
)

func PossibleUpgradeModeValues

func PossibleUpgradeModeValues() []UpgradeMode

PossibleUpgradeModeValues returns the possible values for the UpgradeMode const type.

type UpgradePolicy

type UpgradePolicy struct {
	// REQUIRED; Specifies the mode of an upgrade to virtual machines in the scale set.
	// Possible values are:
	// Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade
	// action.
	// Automatic - All virtual machines in the scale set are automatically updated at the same time.
	// Rolling - Scale set performs updates in batches with an optional pause time in between.
	Mode *UpgradeMode

	// The configuration parameters used for performing automatic OS upgrade.
	AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy

	// The configuration parameters used while performing a rolling upgrade.
	RollingUpgradePolicy *RollingUpgradePolicy
}

UpgradePolicy - Describes an upgrade policy - automatic, manual, or rolling.

func (UpgradePolicy) MarshalJSON

func (u UpgradePolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpgradePolicy.

func (*UpgradePolicy) UnmarshalJSON

func (u *UpgradePolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpgradePolicy.

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

func (u UserAccount) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAccount.

func (*UserAccount) UnmarshalJSON

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

func (u UserAssignedIdentities) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentities.

func (*UserAssignedIdentities) UnmarshalJSON

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

func (u UserIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserIdentity.

func (*UserIdentity) UnmarshalJSON

func (u *UserIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentity.

type VMDiskSecurityProfile

type VMDiskSecurityProfile struct {
	// Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption of just the VMGuestState
	// blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState
	// blob. Note: It can be set for only Confidential VMs and required when using Confidential VMs.
	SecurityEncryptionType *SecurityEncryptionTypes
}

VMDiskSecurityProfile - Specifies the security profile settings for the managed disk. Note: It can only be set for Confidential VMs and is required when using Confidential VMs.

func (VMDiskSecurityProfile) MarshalJSON

func (v VMDiskSecurityProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMDiskSecurityProfile.

func (*VMDiskSecurityProfile) UnmarshalJSON

func (v *VMDiskSecurityProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMDiskSecurityProfile.

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

	// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension
	// available.
	EnableAutomaticUpgrade *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

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

	// Specifies the security profile settings for the virtual machine or virtual machine scale set.
	SecurityProfile *SecurityProfile

	// The service artifact reference id in the form of
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}
	ServiceArtifactReference *ServiceArtifactReference

	// This property must not be specified if the imageReference specifies a Linux OS image.
	WindowsConfiguration *WindowsConfiguration
}

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

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

func (v VirtualMachineFamilyCoreQuota) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineFamilyCoreQuota.

func (*VirtualMachineFamilyCoreQuota) UnmarshalJSON

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

func (w WindowsConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WindowsConfiguration.

func (*WindowsConfiguration) UnmarshalJSON

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 is Interactive.
	LoginMode *LoginMode
}

WindowsUserConfiguration - Properties used to create a user account on a Windows node.

func (WindowsUserConfiguration) MarshalJSON

func (w WindowsUserConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WindowsUserConfiguration.

func (*WindowsUserConfiguration) UnmarshalJSON

func (w *WindowsUserConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WindowsUserConfiguration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL