azure

package module
v2.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Overview

Package azure allows users to interact with resources on the Microsoft Azure platform.

Index

Constants

View Source
const (
	// AzureSubscriptionID is an optional env variable supported by the `azurerm` Terraform provider to
	// designate a target Azure subscription ID
	AzureSubscriptionID = "ARM_SUBSCRIPTION_ID"

	// AzureResGroupName is an optional env variable custom to Terratest to designate a target Azure resource group
	AzureResGroupName = "AZURE_RES_GROUP_NAME"
)
View Source
const (
	// AzureEnvironmentEnvName is the name of the Azure environment to use. Set to one of the following:
	//
	// "AzureChinaCloud":        ChinaCloud
	// "AzureGermanCloud":       GermanCloud
	// "AzurePublicCloud":       PublicCloud
	// "AzureUSGovernmentCloud": USGovernmentCloud
	// "AzureStackCloud":		 Azure stack
	AzureEnvironmentEnvName = "AZURE_ENVIRONMENT"
)

Variables

This section is empty.

Functions

func AppExistsContext

func AppExistsContext(t testing.TestingT, ctx context.Context, appName string, resourceGroupName string, subscriptionID string) bool

AppExistsContext indicates whether the specified application exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func AppExistsContextE

func AppExistsContextE(ctx context.Context, appName string, resourceGroupName string, subscriptionID string) (bool, error)

AppExistsContextE indicates whether the specified application exists. The ctx parameter supports cancellation and timeouts.

func AvailabilitySetExistsContext

func AvailabilitySetExistsContext(t testing.TestingT, ctx context.Context, avsName string, resGroupName string, subscriptionID string) bool

AvailabilitySetExistsContext indicates whether the specified Azure Availability Set exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func AvailabilitySetExistsContextE

func AvailabilitySetExistsContextE(t testing.TestingT, ctx context.Context, avsName string, resGroupName string, subscriptionID string) (bool, error)

AvailabilitySetExistsContextE indicates whether the specified Azure Availability Set exists. The ctx parameter supports cancellation and timeouts.

func BuildNamespaceIdsList

func BuildNamespaceIdsList(sbNamespace []*armservicebus.SBNamespace) []string

BuildNamespaceIdsList is a helper method to build a namespace id list.

func BuildNamespaceNamesList

func BuildNamespaceNamesList(sbNamespace []*armservicebus.SBNamespace) []string

BuildNamespaceNamesList is a helper method to build a namespace name list.

func CheckAvailabilitySetContainsVMContext

func CheckAvailabilitySetContainsVMContext(t testing.TestingT, ctx context.Context, vmName string, avsName string, resGroupName string, subscriptionID string) bool

CheckAvailabilitySetContainsVMContext checks if the Virtual Machine is contained in the Availability Set VMs. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func CheckAvailabilitySetContainsVMContextE

func CheckAvailabilitySetContainsVMContextE(t testing.TestingT, ctx context.Context, vmName string, avsName string, resGroupName string, subscriptionID string) (bool, error)

CheckAvailabilitySetContainsVMContextE checks if the Virtual Machine is contained in the Availability Set VMs. The ctx parameter supports cancellation and timeouts.

func CheckAvailabilitySetContainsVMWithClient

func CheckAvailabilitySetContainsVMWithClient(ctx context.Context, client *armcompute.AvailabilitySetsClient, resGroupName string, avsName string, vmName string) (bool, error)

CheckAvailabilitySetContainsVMWithClient checks if the Virtual Machine is contained in the Availability Set VMs using the provided AvailabilitySetsClient.

func CheckPublicDNSNameAvailabilityContext

func CheckPublicDNSNameAvailabilityContext(t testing.TestingT, ctx context.Context, location string, domainNameLabel string, subscriptionID string) bool

CheckPublicDNSNameAvailabilityContext checks whether a domain name in the cloudapp.azure.com zone is available for use. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func CheckPublicDNSNameAvailabilityContextE

func CheckPublicDNSNameAvailabilityContextE(ctx context.Context, location string, domainNameLabel string, subscriptionID string) (bool, error)

CheckPublicDNSNameAvailabilityContextE checks whether a domain name in the cloudapp.azure.com zone is available for use. The ctx parameter supports cancellation and timeouts.

func CheckSubnetContainsIPContext

func CheckSubnetContainsIPContext(t testing.TestingT, ctx context.Context, ipAddress string, subnetName string, vnetName string, resGroupName string, subscriptionID string) bool

CheckSubnetContainsIPContext checks if the Private IP is contained in the Subnet Address Range. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func CheckSubnetContainsIPContextE

func CheckSubnetContainsIPContextE(ctx context.Context, ipAddress string, subnetName string, vnetName string, resGroupName string, subscriptionID string) (bool, error)

CheckSubnetContainsIPContextE checks if the Private IP is contained in the Subnet Address Range. The ctx parameter supports cancellation and timeouts.

func CheckSubnetContainsIPWithClient

func CheckSubnetContainsIPWithClient(ctx context.Context, client *armnetwork.SubnetsClient, ipAddress string, subnetName string, vnetName string, resGroupName string) (bool, error)

CheckSubnetContainsIPWithClient checks if the Private IP is contained in the Subnet Address Range using a pre-built SubnetsClient.

func ContainerAppExistsContext

func ContainerAppExistsContext(t testing.TestingT, ctx context.Context, containerAppName string, resourceGroupName string, subscriptionID string) bool

ContainerAppExistsContext indicates whether the Container App exists for the subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ContainerAppExistsContextE

func ContainerAppExistsContextE(ctx context.Context, containerAppName string, resourceGroupName string, subscriptionID string) (bool, error)

ContainerAppExistsContextE indicates whether the Container App exists for the subscription. The ctx parameter supports cancellation and timeouts.

func ContainerAppJobExistsContext

func ContainerAppJobExistsContext(t testing.TestingT, ctx context.Context, containerAppName string, resourceGroupName string, subscriptionID string) bool

ContainerAppJobExistsContext indicates whether the Container App Job exists for the subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ContainerAppJobExistsContextE

func ContainerAppJobExistsContextE(ctx context.Context, containerAppName string, resourceGroupName string, subscriptionID string) (bool, error)

ContainerAppJobExistsContextE indicates whether the Container App Job exists for the subscription. The ctx parameter supports cancellation and timeouts.

func ContainerInstanceExistsContext

func ContainerInstanceExistsContext(t testing.TestingT, ctx context.Context, instanceName string, resourceGroupName string, subscriptionID string) bool

ContainerInstanceExistsContext indicates whether the specified container instance exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ContainerInstanceExistsContextE

func ContainerInstanceExistsContextE(ctx context.Context, instanceName string, resourceGroupName string, subscriptionID string) (bool, error)

ContainerInstanceExistsContextE indicates whether the specified container instance exists. The ctx parameter supports cancellation and timeouts.

func ContainerRegistryExistsContext

func ContainerRegistryExistsContext(t testing.TestingT, ctx context.Context, registryName string, resourceGroupName string, subscriptionID string) bool

ContainerRegistryExistsContext indicates whether the specified container registry exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ContainerRegistryExistsContextE

func ContainerRegistryExistsContextE(ctx context.Context, registryName string, resourceGroupName string, subscriptionID string) (bool, error)

ContainerRegistryExistsContextE indicates whether the specified container registry exists. The ctx parameter supports cancellation and timeouts.

func CreateActionGroupClientContext

func CreateActionGroupClientContext(_ context.Context, subscriptionID string) (*armmonitor.ActionGroupsClient, error)

CreateActionGroupClientContext creates an Action Groups client for Azure Monitor. The ctx parameter supports cancellation and timeouts.

func CreateActivityLogAlertsClientContextE

func CreateActivityLogAlertsClientContextE(_ context.Context, subscriptionID string) (*armmonitor.ActivityLogAlertsClient, error)

CreateActivityLogAlertsClientContextE gets an Activity Log Alerts client in the specified Azure Subscription. The ctx parameter supports cancellation and timeouts.

func CreateAppServiceClientContextE

func CreateAppServiceClientContextE(_ context.Context, subscriptionID string) (*armappservice.WebAppsClient, error)

CreateAppServiceClientContextE returns an App Service client. The ctx parameter supports cancellation and timeouts.

func CreateAvailabilitySetClientContextE

func CreateAvailabilitySetClientContextE(_ context.Context, subscriptionID string) (*armcompute.AvailabilitySetsClient, error)

CreateAvailabilitySetClientContextE creates a new Availability Set client. The ctx parameter supports cancellation and timeouts.

func CreateContainerAppJobsClientContextE

func CreateContainerAppJobsClientContextE(_ context.Context, subscriptionID string) (*armappcontainers.JobsClient, error)

CreateContainerAppJobsClientContextE creates a Container App Jobs client for Azure Container Apps. The ctx parameter supports cancellation and timeouts.

func CreateContainerAppsClientContextE

func CreateContainerAppsClientContextE(_ context.Context, subscriptionID string) (*armappcontainers.ContainerAppsClient, error)

CreateContainerAppsClientContextE creates a Container Apps client for Azure Container Apps. The ctx parameter supports cancellation and timeouts.

func CreateContainerInstanceClientContextE

func CreateContainerInstanceClientContextE(_ context.Context, subscriptionID string) (*armcontainerinstance.ContainerGroupsClient, error)

CreateContainerInstanceClientContextE returns an ACI container groups client. The ctx parameter supports cancellation and timeouts.

func CreateContainerRegistryClientContextE

func CreateContainerRegistryClientContextE(_ context.Context, subscriptionID string) (*armcontainerregistry.RegistriesClient, error)

CreateContainerRegistryClientContextE returns an ACR registries client. The ctx parameter supports cancellation and timeouts.

func CreateCosmosDBAccountClientContextE

func CreateCosmosDBAccountClientContextE(_ context.Context, subscriptionID string) (*armcosmos.DatabaseAccountsClient, error)

CreateCosmosDBAccountClientContextE returns a Cosmos DB database accounts client. The ctx parameter supports cancellation and timeouts.

func CreateCosmosDBSQLClientContextE

func CreateCosmosDBSQLClientContextE(_ context.Context, subscriptionID string) (*armcosmos.SQLResourcesClient, error)

CreateCosmosDBSQLClientContextE returns a Cosmos DB SQL resources client. The ctx parameter supports cancellation and timeouts.

func CreateDataFactoriesClientContextE

func CreateDataFactoriesClientContextE(_ context.Context, subscriptionID string) (*armdatafactory.FactoriesClient, error)

CreateDataFactoriesClientContextE is a helper function that will setup a data factory client. The ctx parameter supports cancellation and timeouts.

func CreateDatabaseClientContext

func CreateDatabaseClientContext(_ context.Context, subscriptionID string) (*armsql.DatabasesClient, error)

CreateDatabaseClientContext is a helper function that will create and setup a SQL DB client. The ctx parameter supports cancellation and timeouts.

func CreateDiagnosticsSettingsClientContextE

func CreateDiagnosticsSettingsClientContextE(_ context.Context, subscriptionID string) (*armmonitor.DiagnosticSettingsClient, error)

CreateDiagnosticsSettingsClientContextE returns a diagnostics settings client. The ctx parameter supports cancellation and timeouts.

func CreateDisksClientContextE

func CreateDisksClientContextE(_ context.Context, subscriptionID string) (*armcompute.DisksClient, error)

CreateDisksClientContextE returns a disks client. The ctx parameter supports cancellation and timeouts.

func CreateFrontDoorClientContextE

func CreateFrontDoorClientContextE(_ context.Context, subscriptionID string) (*armfrontdoor.FrontDoorsClient, error)

CreateFrontDoorClientContextE returns a Front Door client. The ctx parameter supports cancellation and timeouts.

func CreateFrontDoorFrontendEndpointClientContextE

func CreateFrontDoorFrontendEndpointClientContextE(_ context.Context, subscriptionID string) (*armfrontdoor.FrontendEndpointsClient, error)

CreateFrontDoorFrontendEndpointClientContextE returns a Front Door Frontend Endpoints client. The ctx parameter supports cancellation and timeouts.

func CreateLoadBalancerClientContextE

func CreateLoadBalancerClientContextE(_ context.Context, subscriptionID string) (*armnetwork.LoadBalancersClient, error)

CreateLoadBalancerClientContextE returns a load balancer client. The ctx parameter supports cancellation and timeouts.

func CreateLoadBalancerFrontendIPConfigClientContextE

func CreateLoadBalancerFrontendIPConfigClientContextE(_ context.Context, subscriptionID string) (*armnetwork.LoadBalancerFrontendIPConfigurationsClient, error)

CreateLoadBalancerFrontendIPConfigClientContextE returns a load balancer frontend IP configuration client. The ctx parameter supports cancellation and timeouts.

func CreateLogAnalyticsWorkspacesClientContextE

func CreateLogAnalyticsWorkspacesClientContextE(_ context.Context, subscriptionID string) (*armoperationalinsights.WorkspacesClient, error)

CreateLogAnalyticsWorkspacesClientContextE returns a workspaces client. The ctx parameter supports cancellation and timeouts.

func CreateManagedClustersClientContextE

func CreateManagedClustersClientContextE(_ context.Context, subscriptionID string) (*armcontainerservice.ManagedClustersClient, error)

CreateManagedClustersClientContextE returns a managed clusters client. The ctx parameter supports cancellation and timeouts.

func CreateManagedEnvironmentsClientContextE

func CreateManagedEnvironmentsClientContextE(_ context.Context, subscriptionID string) (*armappcontainers.ManagedEnvironmentsClient, error)

CreateManagedEnvironmentsClientContextE creates a managed environments client for Azure Container Apps. The ctx parameter supports cancellation and timeouts.

func CreateMySQLServerClientContextE

func CreateMySQLServerClientContextE(_ context.Context, subscriptionID string) (*armmysql.ServersClient, error)

CreateMySQLServerClientContextE is a helper function that will setup a mysql server client. The ctx parameter supports cancellation and timeouts.

func CreateNetworkInterfaceIPConfigurationClientContextE

func CreateNetworkInterfaceIPConfigurationClientContextE(_ context.Context, subscriptionID string) (*armnetwork.InterfaceIPConfigurationsClient, error)

CreateNetworkInterfaceIPConfigurationClientContextE returns a NIC IP configuration client. The ctx parameter supports cancellation and timeouts.

func CreateNetworkInterfacesClientContextE

func CreateNetworkInterfacesClientContextE(_ context.Context, subscriptionID string) (*armnetwork.InterfacesClient, error)

CreateNetworkInterfacesClientContextE returns a network interfaces client. The ctx parameter supports cancellation and timeouts.

func CreateNetworkManagementClientContextE

func CreateNetworkManagementClientContextE(_ context.Context, subscriptionID string) (*armnetwork.ManagementClient, error)

CreateNetworkManagementClientContextE returns a network management client. The ctx parameter supports cancellation and timeouts.

func CreateNsgCustomRulesClientContextE

func CreateNsgCustomRulesClientContextE(_ context.Context, subscriptionID string) (*armnetwork.SecurityRulesClient, error)

CreateNsgCustomRulesClientContextE returns an NSG custom (user) rules client. The ctx parameter supports cancellation and timeouts.

func CreateNsgDefaultRulesClientContextE

func CreateNsgDefaultRulesClientContextE(_ context.Context, subscriptionID string) (*armnetwork.DefaultSecurityRulesClient, error)

CreateNsgDefaultRulesClientContextE returns an NSG default (platform) rules client. The ctx parameter supports cancellation and timeouts.

func CreatePublicIPAddressesClientContextE

func CreatePublicIPAddressesClientContextE(_ context.Context, subscriptionID string) (*armnetwork.PublicIPAddressesClient, error)

CreatePublicIPAddressesClientContextE returns a public IP addresses client. The ctx parameter supports cancellation and timeouts.

func CreateResourceGroupClientContextE

func CreateResourceGroupClientContextE(_ context.Context, subscriptionID string) (*armresources.ResourceGroupsClient, error)

CreateResourceGroupClientContextE gets a resource group client in a subscription. The ctx parameter supports cancellation and timeouts.

func CreateSQLManagedDatabasesClientContext

func CreateSQLManagedDatabasesClientContext(_ context.Context, subscriptionID string) (*armsql.ManagedDatabasesClient, error)

CreateSQLManagedDatabasesClientContext is a helper function that will create and setup a sql managed databases client. The ctx parameter supports cancellation and timeouts.

func CreateSQLManagedInstanceClientContext

func CreateSQLManagedInstanceClientContext(_ context.Context, subscriptionID string) (*armsql.ManagedInstancesClient, error)

CreateSQLManagedInstanceClientContext is a helper function that will create and setup a sql managed instance client. The ctx parameter supports cancellation and timeouts.

func CreateSQLServerClientContext

func CreateSQLServerClientContext(_ context.Context, subscriptionID string) (*armsql.ServersClient, error)

CreateSQLServerClientContext is a helper function that will create and setup a sql server client. The ctx parameter supports cancellation and timeouts.

func CreateServiceBusNamespacesClientContextE

func CreateServiceBusNamespacesClientContextE(_ context.Context, subscriptionID string) (*armservicebus.NamespacesClient, error)

CreateServiceBusNamespacesClientContextE returns a service bus namespaces client. The ctx parameter supports cancellation and timeouts.

func CreateServiceBusSubscriptionsClientContextE

func CreateServiceBusSubscriptionsClientContextE(_ context.Context, subscriptionID string) (*armservicebus.SubscriptionsClient, error)

CreateServiceBusSubscriptionsClientContextE returns a service bus subscriptions client. The ctx parameter supports cancellation and timeouts.

func CreateServiceBusTopicsClientContextE

func CreateServiceBusTopicsClientContextE(_ context.Context, subscriptionID string) (*armservicebus.TopicsClient, error)

CreateServiceBusTopicsClientContextE returns a service bus topics client. The ctx parameter supports cancellation and timeouts.

func CreateStorageAccountClientContextE

func CreateStorageAccountClientContextE(_ context.Context, subscriptionID string) (*armstorage.AccountsClient, error)

CreateStorageAccountClientContextE creates a storage account client. The ctx parameter supports cancellation and timeouts.

func CreateStorageBlobContainerClientContextE

func CreateStorageBlobContainerClientContextE(_ context.Context, subscriptionID string) (*armstorage.BlobContainersClient, error)

CreateStorageBlobContainerClientContextE creates a storage blob container client. The ctx parameter supports cancellation and timeouts.

func CreateStorageFileSharesClientContextE

func CreateStorageFileSharesClientContextE(_ context.Context, subscriptionID string) (*armstorage.FileSharesClient, error)

CreateStorageFileSharesClientContextE creates a storage file shares client. The ctx parameter supports cancellation and timeouts.

func CreateSubnetClientContextE

func CreateSubnetClientContextE(_ context.Context, subscriptionID string) (*armnetwork.SubnetsClient, error)

CreateSubnetClientContextE returns a subnet client. The ctx parameter supports cancellation and timeouts.

func CreateSubscriptionsClientContextE

func CreateSubscriptionsClientContextE(_ context.Context) (*armsubscriptions.Client, error)

CreateSubscriptionsClientContextE returns a subscriptions client. The ctx parameter supports cancellation and timeouts.

func CreateSynapseSQLPoolClientContextE

func CreateSynapseSQLPoolClientContextE(_ context.Context, subscriptionID string) (*armsynapse.SQLPoolsClient, error)

CreateSynapseSQLPoolClientContextE is a helper function that will setup a Synapse SQL pool client. The ctx parameter supports cancellation and timeouts.

func CreateSynapseWorkspaceClientContextE

func CreateSynapseWorkspaceClientContextE(_ context.Context, subscriptionID string) (*armsynapse.WorkspacesClient, error)

CreateSynapseWorkspaceClientContextE is a helper function that will setup a synapse workspace client. The ctx parameter supports cancellation and timeouts.

func CreateVMInsightsClientContextE

func CreateVMInsightsClientContextE(_ context.Context, subscriptionID string) (*armmonitor.VMInsightsClient, error)

CreateVMInsightsClientContextE gets a VM Insights client. The ctx parameter supports cancellation and timeouts.

func CreateVirtualMachinesClientContextE

func CreateVirtualMachinesClientContextE(_ context.Context, subscriptionID string) (*armcompute.VirtualMachinesClient, error)

CreateVirtualMachinesClientContextE returns a virtual machines client. The ctx parameter supports cancellation and timeouts.

func CreateVirtualNetworkClientContextE

func CreateVirtualNetworkClientContextE(_ context.Context, subscriptionID string) (*armnetwork.VirtualNetworksClient, error)

CreateVirtualNetworkClientContextE returns a virtual network client. The ctx parameter supports cancellation and timeouts.

func DataFactoryExistsContext

func DataFactoryExistsContext(t testing.TestingT, ctx context.Context, dataFactoryName string, resourceGroupName string, subscriptionID string) bool

DataFactoryExistsContext indicates whether the Data Factory exists for the subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func DataFactoryExistsContextE

func DataFactoryExistsContextE(ctx context.Context, dataFactoryName string, resourceGroupName string, subscriptionID string) (bool, error)

DataFactoryExistsContextE indicates whether the specified Data Factory exists and may return an error. The ctx parameter supports cancellation and timeouts.

func DiagnosticSettingsResourceExistsContext

func DiagnosticSettingsResourceExistsContext(t testing.TestingT, ctx context.Context, diagnosticSettingsResourceName string, resourceURI string, subscriptionID string) bool

DiagnosticSettingsResourceExistsContext indicates whether the diagnostic settings resource exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func DiagnosticSettingsResourceExistsContextE

func DiagnosticSettingsResourceExistsContextE(ctx context.Context, diagnosticSettingsResourceName string, resourceURI string, subscriptionID string) (bool, error)

DiagnosticSettingsResourceExistsContextE indicates whether the diagnostic settings resource exists. The ctx parameter supports cancellation and timeouts.

func DiagnosticSettingsResourceExistsWithClient

func DiagnosticSettingsResourceExistsWithClient(ctx context.Context, client *armmonitor.DiagnosticSettingsClient, resourceURI string, name string) (bool, error)

DiagnosticSettingsResourceExistsWithClient checks if a diagnostic settings resource exists using the provided client.

func DiskExistsContext

func DiskExistsContext(t testing.TestingT, ctx context.Context, diskName string, resGroupName string, subscriptionID string) bool

DiskExistsContext indicates whether the specified Azure Managed Disk exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func DiskExistsContextE

func DiskExistsContextE(ctx context.Context, diskName string, resGroupName string, subscriptionID string) (bool, error)

DiskExistsContextE indicates whether the specified Azure Managed Disk exists in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func DiskExistsWithClient

func DiskExistsWithClient(ctx context.Context, client *armcompute.DisksClient, resGroupName string, diskName string) (bool, error)

DiskExistsWithClient checks if a Disk exists using the provided DisksClient.

func ExtractAvailabilitySetFaultDomainCount

func ExtractAvailabilitySetFaultDomainCount(avs *armcompute.AvailabilitySet) (int32, error)

ExtractAvailabilitySetFaultDomainCount gets the Fault Domain Count from the provided AvailabilitySet.

func ExtractBlobContainerPublicAccess

func ExtractBlobContainerPublicAccess(container *armstorage.BlobContainer) bool

ExtractBlobContainerPublicAccess returns true if the container has public access other than "None".

func ExtractIPOfPublicIPAddress

func ExtractIPOfPublicIPAddress(pip *armnetwork.PublicIPAddress) (string, error)

ExtractIPOfPublicIPAddress gets the IP string from a PublicIPAddress.

func ExtractLoadBalancerFrontendIPConfigNames

func ExtractLoadBalancerFrontendIPConfigNames(lb *armnetwork.LoadBalancer) []string

ExtractLoadBalancerFrontendIPConfigNames gets a list of the Frontend IP Configuration Names from a Load Balancer.

func ExtractNetworkInterfacePrivateIPs

func ExtractNetworkInterfacePrivateIPs(nic *armnetwork.Interface) []string

ExtractNetworkInterfacePrivateIPs gets a list of the Private IPs from a Network Interface.

func ExtractStorageAccountKind

func ExtractStorageAccountKind(account *armstorage.Account) string

ExtractStorageAccountKind returns the storage account kind as a string.

func ExtractStorageAccountSkuTier

func ExtractStorageAccountSkuTier(account *armstorage.Account) string

ExtractStorageAccountSkuTier returns the storage account SKU tier as a string.

func ExtractVirtualNetworkDNSServerIPs

func ExtractVirtualNetworkDNSServerIPs(vnet *armnetwork.VirtualNetwork) []string

ExtractVirtualNetworkDNSServerIPs gets a list of all DNS server IPs from a VirtualNetwork.

func FetchBlobContainer

func FetchBlobContainer(ctx context.Context, client *armstorage.BlobContainersClient, resourceGroupName, storageAccountName, containerName string) (*armstorage.BlobContainer, error)

FetchBlobContainer retrieves a blob container using the provided client.

func FetchFileShare

func FetchFileShare(ctx context.Context, client *armstorage.FileSharesClient, resourceGroupName, storageAccountName, fileShareName string) (*armstorage.FileShare, error)

FetchFileShare retrieves a file share using the provided client with stats expansion.

func FetchStorageAccountProperties

func FetchStorageAccountProperties(ctx context.Context, client *armstorage.AccountsClient, resourceGroupName, storageAccountName string) (*armstorage.Account, error)

FetchStorageAccountProperties retrieves the storage account properties using the provided client.

func FrontDoorExistsContext

func FrontDoorExistsContext(t testing.TestingT, ctx context.Context, frontDoorName string, resourceGroupName string, subscriptionID string) bool

FrontDoorExistsContext indicates whether the Front Door exists for the subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func FrontDoorExistsContextE

func FrontDoorExistsContextE(ctx context.Context, frontDoorName string, resourceGroupName string, subscriptionID string) (bool, error)

FrontDoorExistsContextE indicates whether the specified Front Door exists. The ctx parameter supports cancellation and timeouts.

func FrontDoorFrontendEndpointExistsContext

func FrontDoorFrontendEndpointExistsContext(t testing.TestingT, ctx context.Context, endpointName string, frontDoorName string, resourceGroupName string, subscriptionID string) bool

FrontDoorFrontendEndpointExistsContext indicates whether the frontend endpoint exists for the provided Front Door. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func FrontDoorFrontendEndpointExistsContextE

func FrontDoorFrontendEndpointExistsContextE(ctx context.Context, endpointName string, frontDoorName string, resourceGroupName string, subscriptionID string) (bool, error)

FrontDoorFrontendEndpointExistsContextE indicates whether the specified endpoint exists for the provided Front Door. The ctx parameter supports cancellation and timeouts.

func GetAResourceGroupContext

func GetAResourceGroupContext(t testing.TestingT, ctx context.Context, resourceGroupName string, subscriptionID string) *armresources.ResourceGroup

GetAResourceGroupContext returns a resource group within a subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetAResourceGroupContextE

func GetAResourceGroupContextE(ctx context.Context, resourceGroupName, subscriptionID string) (*armresources.ResourceGroup, error)

GetAResourceGroupContextE gets a resource group within a subscription. The ctx parameter supports cancellation and timeouts.

func GetAResourceGroupWithClient

func GetAResourceGroupWithClient(ctx context.Context, client *armresources.ResourceGroupsClient, resourceGroupName string) (*armresources.ResourceGroup, error)

GetAResourceGroupWithClient gets a resource group using the provided ResourceGroupsClient.

func GetActionGroupResourceContext

func GetActionGroupResourceContext(t testing.TestingT, ctx context.Context, ruleName string, resGroupName string, subscriptionID string) *armmonitor.ActionGroupResource

GetActionGroupResourceContext gets the ActionGroupResource. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts. ruleName - required to find the ActionGroupResource. resGroupName - use an empty string if you have the AZURE_RES_GROUP_NAME environment variable set subscriptionId - use an empty string if you have the ARM_SUBSCRIPTION_ID environment variable set

func GetActionGroupResourceContextE

func GetActionGroupResourceContextE(ctx context.Context, ruleName string, resGroupName string, subscriptionID string) (*armmonitor.ActionGroupResource, error)

GetActionGroupResourceContextE gets the ActionGroupResource. The ctx parameter supports cancellation and timeouts. ruleName - required to find the ActionGroupResource. resGroupName - use an empty string if you have the AZURE_RES_GROUP_NAME environment variable set subscriptionId - use an empty string if you have the ARM_SUBSCRIPTION_ID environment variable set

func GetActionGroupResourceWithClient

func GetActionGroupResourceWithClient(ctx context.Context, client *armmonitor.ActionGroupsClient, resGroupName string, ruleName string) (*armmonitor.ActionGroupResource, error)

GetActionGroupResourceWithClient gets the ActionGroupResource using the provided client.

func GetActivityLogAlertResourceContext

func GetActivityLogAlertResourceContext(t testing.TestingT, ctx context.Context, activityLogAlertName string, resGroupName string, subscriptionID string) *armmonitor.ActivityLogAlertResource

GetActivityLogAlertResourceContext gets an Activity Log Alert Resource in the specified Azure Resource Group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetActivityLogAlertResourceContextE

func GetActivityLogAlertResourceContextE(ctx context.Context, activityLogAlertName string, resGroupName string, subscriptionID string) (*armmonitor.ActivityLogAlertResource, error)

GetActivityLogAlertResourceContextE gets an Activity Log Alert Resource in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetActivityLogAlertResourceWithClient

func GetActivityLogAlertResourceWithClient(ctx context.Context, client *armmonitor.ActivityLogAlertsClient, resGroupName string, activityLogAlertName string) (*armmonitor.ActivityLogAlertResource, error)

GetActivityLogAlertResourceWithClient gets an Activity Log Alert Resource using the provided client.

func GetAllAzureRegionsContext

func GetAllAzureRegionsContext(t testing.TestingT, ctx context.Context, subscriptionID string) []string

GetAllAzureRegionsContext gets the list of Azure regions available in this subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetAllAzureRegionsContextE

func GetAllAzureRegionsContextE(t testing.TestingT, ctx context.Context, subscriptionID string) ([]string, error)

GetAllAzureRegionsContextE gets the list of Azure regions available in this subscription. The ctx parameter supports cancellation and timeouts.

func GetAppServiceClientContextE

func GetAppServiceClientContextE(_ context.Context, subscriptionID string) (*armappservice.WebAppsClient, error)

GetAppServiceClientContextE creates and returns an App Service web apps client. The ctx parameter supports cancellation and timeouts.

func GetAppServiceContext

func GetAppServiceContext(t testing.TestingT, ctx context.Context, appName string, resGroupName string, subscriptionID string) *armappservice.Site

GetAppServiceContext gets the App service object for the specified application. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetAppServiceContextE

func GetAppServiceContextE(ctx context.Context, appName string, resGroupName string, subscriptionID string) (*armappservice.Site, error)

GetAppServiceContextE gets the App service object for the specified application. The ctx parameter supports cancellation and timeouts.

func GetAppServiceWithClient

func GetAppServiceWithClient(ctx context.Context, client *armappservice.WebAppsClient, resourceGroupName string, appName string) (*armappservice.Site, error)

GetAppServiceWithClient gets the App service object using the provided client. This variant is useful for testing with fake clients.

func GetAvailabilitySetContextE

func GetAvailabilitySetContextE(t testing.TestingT, ctx context.Context, avsName string, resGroupName string, subscriptionID string) (*armcompute.AvailabilitySet, error)

GetAvailabilitySetContextE gets an Availability Set in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetAvailabilitySetFaultDomainCountContext

func GetAvailabilitySetFaultDomainCountContext(t testing.TestingT, ctx context.Context, avsName string, resGroupName string, subscriptionID string) int32

GetAvailabilitySetFaultDomainCountContext gets the Fault Domain Count for the specified Azure Availability Set. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetAvailabilitySetFaultDomainCountContextE

func GetAvailabilitySetFaultDomainCountContextE(t testing.TestingT, ctx context.Context, avsName string, resGroupName string, subscriptionID string) (int32, error)

GetAvailabilitySetFaultDomainCountContextE gets the Fault Domain Count for the specified Azure Availability Set. The ctx parameter supports cancellation and timeouts.

func GetAvailabilitySetVMNamesInCapsContext

func GetAvailabilitySetVMNamesInCapsContext(t testing.TestingT, ctx context.Context, avsName string, resGroupName string, subscriptionID string) []string

GetAvailabilitySetVMNamesInCapsContext gets a list of VM names in the specified Azure Availability Set. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetAvailabilitySetVMNamesInCapsContextE

func GetAvailabilitySetVMNamesInCapsContextE(t testing.TestingT, ctx context.Context, avsName string, resGroupName string, subscriptionID string) ([]string, error)

GetAvailabilitySetVMNamesInCapsContextE gets a list of VM names in the specified Azure Availability Set. The ctx parameter supports cancellation and timeouts.

func GetAvailabilitySetVMNamesInCapsWithClient

func GetAvailabilitySetVMNamesInCapsWithClient(ctx context.Context, client *armcompute.AvailabilitySetsClient, resGroupName string, avsName string) ([]string, error)

GetAvailabilitySetVMNamesInCapsWithClient gets a list of VM names in the specified Azure Availability Set using the provided AvailabilitySetsClient.

func GetAvailabilitySetWithClient

func GetAvailabilitySetWithClient(ctx context.Context, client *armcompute.AvailabilitySetsClient, resGroupName string, avsName string) (*armcompute.AvailabilitySet, error)

GetAvailabilitySetWithClient gets an Availability Set using the provided AvailabilitySetsClient.

func GetBackupPolicyListWithClient

func GetBackupPolicyListWithClient(ctx context.Context, client *armrecoveryservicesbackup.BackupPoliciesClient, vaultName, resourceGroupName string) (map[string]armrecoveryservicesbackup.ProtectionPolicyResource, error)

GetBackupPolicyListWithClient retrieves all backup policies for a vault using the provided client.

func GetBackupProtectedVMListWithClient

func GetBackupProtectedVMListWithClient(ctx context.Context, client *armrecoveryservicesbackup.BackupProtectedItemsClient, vaultName, resourceGroupName, policyName string) (map[string]armrecoveryservicesbackup.AzureIaaSComputeVMProtectedItem, error)

GetBackupProtectedVMListWithClient retrieves all protected VMs matching the given policy using the provided client.

func GetContainerAppContext

func GetContainerAppContext(t testing.TestingT, ctx context.Context, containerAppName string, resourceGroupName string, subscriptionID string) *armappcontainers.ContainerApp

GetContainerAppContext returns the Container App object. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetContainerAppContextE

func GetContainerAppContextE(ctx context.Context, containerAppName string, resourceGroupName string, subscriptionID string) (*armappcontainers.ContainerApp, error)

GetContainerAppContextE returns the Container App object. The ctx parameter supports cancellation and timeouts.

func GetContainerAppJobContext

func GetContainerAppJobContext(t testing.TestingT, ctx context.Context, containerAppName string, resourceGroupName string, subscriptionID string) *armappcontainers.Job

GetContainerAppJobContext returns the Container App Job object. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetContainerAppJobContextE

func GetContainerAppJobContextE(ctx context.Context, containerAppName string, resourceGroupName string, subscriptionID string) (*armappcontainers.Job, error)

GetContainerAppJobContextE returns the Container App Job object. The ctx parameter supports cancellation and timeouts.

func GetContainerAppJobWithClient

func GetContainerAppJobWithClient(ctx context.Context, client *armappcontainers.JobsClient, resourceGroupName string, containerAppName string) (*armappcontainers.Job, error)

GetContainerAppJobWithClient returns a Container App Job using the provided JobsClient. This variant is useful for testing with fake clients.

func GetContainerAppWithClient

func GetContainerAppWithClient(ctx context.Context, client *armappcontainers.ContainerAppsClient, resourceGroupName string, containerAppName string) (*armappcontainers.ContainerApp, error)

GetContainerAppWithClient returns a Container App using the provided ContainerAppsClient. This variant is useful for testing with fake clients.

func GetContainerInstanceContext

func GetContainerInstanceContext(t testing.TestingT, ctx context.Context, instanceName string, resGroupName string, subscriptionID string) *armcontainerinstance.ContainerGroup

GetContainerInstanceContext gets the container instance object. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetContainerInstanceContextE

func GetContainerInstanceContextE(ctx context.Context, instanceName string, resGroupName string, subscriptionID string) (*armcontainerinstance.ContainerGroup, error)

GetContainerInstanceContextE gets the container instance object. The ctx parameter supports cancellation and timeouts.

func GetContainerInstanceWithClient

func GetContainerInstanceWithClient(ctx context.Context, client *armcontainerinstance.ContainerGroupsClient, resGroupName string, instanceName string) (*armcontainerinstance.ContainerGroup, error)

GetContainerInstanceWithClient gets a container instance using the provided ContainerGroupsClient.

func GetContainerRegistryContext

func GetContainerRegistryContext(t testing.TestingT, ctx context.Context, registryName string, resGroupName string, subscriptionID string) *armcontainerregistry.Registry

GetContainerRegistryContext gets the container registry object. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetContainerRegistryContextE

func GetContainerRegistryContextE(ctx context.Context, registryName string, resGroupName string, subscriptionID string) (*armcontainerregistry.Registry, error)

GetContainerRegistryContextE gets the container registry object. The ctx parameter supports cancellation and timeouts.

func GetContainerRegistryWithClient

func GetContainerRegistryWithClient(ctx context.Context, client *armcontainerregistry.RegistriesClient, resGroupName string, registryName string) (*armcontainerregistry.Registry, error)

GetContainerRegistryWithClient gets a container registry using the provided RegistriesClient.

func GetCosmosDBAccountClientContext

func GetCosmosDBAccountClientContext(t testing.TestingT, ctx context.Context, subscriptionID string) *armcosmos.DatabaseAccountsClient

GetCosmosDBAccountClientContext is a helper function that will setup a CosmosDB account client. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBAccountClientContextE

func GetCosmosDBAccountClientContextE(ctx context.Context, subscriptionID string) (*armcosmos.DatabaseAccountsClient, error)

GetCosmosDBAccountClientContextE is a helper function that will setup a CosmosDB account client. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBAccountContext

func GetCosmosDBAccountContext(t testing.TestingT, ctx context.Context, subscriptionID string, resourceGroupName string, accountName string) *armcosmos.DatabaseAccountGetResults

GetCosmosDBAccountContext is a helper function that gets the database account. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBAccountContextE

func GetCosmosDBAccountContextE(ctx context.Context, subscriptionID string, resourceGroupName string, accountName string) (*armcosmos.DatabaseAccountGetResults, error)

GetCosmosDBAccountContextE is a helper function that gets the database account. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBAccountWithClient

func GetCosmosDBAccountWithClient(ctx context.Context, client *armcosmos.DatabaseAccountsClient, resourceGroupName string, accountName string) (*armcosmos.DatabaseAccountGetResults, error)

GetCosmosDBAccountWithClient gets a database account using the provided DatabaseAccountsClient.

func GetCosmosDBSQLClientContext

func GetCosmosDBSQLClientContext(t testing.TestingT, ctx context.Context, subscriptionID string) *armcosmos.SQLResourcesClient

GetCosmosDBSQLClientContext is a helper function that will setup a CosmosDB SQL client. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLClientContextE

func GetCosmosDBSQLClientContextE(ctx context.Context, subscriptionID string) (*armcosmos.SQLResourcesClient, error)

GetCosmosDBSQLClientContextE is a helper function that will setup a CosmosDB SQL client. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLContainerContext

func GetCosmosDBSQLContainerContext(t testing.TestingT, ctx context.Context, subscriptionID string, resourceGroupName string, accountName string, databaseName string, containerName string) *armcosmos.SQLContainerGetResults

GetCosmosDBSQLContainerContext is a helper function that gets a SQL container. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLContainerContextE

func GetCosmosDBSQLContainerContextE(ctx context.Context, subscriptionID string, resourceGroupName string, accountName string, databaseName string, containerName string) (*armcosmos.SQLContainerGetResults, error)

GetCosmosDBSQLContainerContextE is a helper function that gets a SQL container. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLContainerThroughputContext

func GetCosmosDBSQLContainerThroughputContext(t testing.TestingT, ctx context.Context, subscriptionID string, resourceGroupName string, accountName string, databaseName string, containerName string) *armcosmos.ThroughputSettingsGetResults

GetCosmosDBSQLContainerThroughputContext is a helper function that gets a SQL container throughput configuration. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLContainerThroughputContextE

func GetCosmosDBSQLContainerThroughputContextE(ctx context.Context, subscriptionID string, resourceGroupName string, accountName string, databaseName string, containerName string) (*armcosmos.ThroughputSettingsGetResults, error)

GetCosmosDBSQLContainerThroughputContextE is a helper function that gets a SQL container throughput configuration. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLContainerThroughputWithClient

func GetCosmosDBSQLContainerThroughputWithClient(ctx context.Context, client *armcosmos.SQLResourcesClient, resourceGroupName string, accountName string, databaseName string, containerName string) (*armcosmos.ThroughputSettingsGetResults, error)

GetCosmosDBSQLContainerThroughputWithClient gets a SQL container throughput configuration using the provided SQLResourcesClient.

func GetCosmosDBSQLContainerWithClient

func GetCosmosDBSQLContainerWithClient(ctx context.Context, client *armcosmos.SQLResourcesClient, resourceGroupName string, accountName string, databaseName string, containerName string) (*armcosmos.SQLContainerGetResults, error)

GetCosmosDBSQLContainerWithClient gets a SQL container using the provided SQLResourcesClient.

func GetCosmosDBSQLDatabaseContext

func GetCosmosDBSQLDatabaseContext(t testing.TestingT, ctx context.Context, subscriptionID string, resourceGroupName string, accountName string, databaseName string) *armcosmos.SQLDatabaseGetResults

GetCosmosDBSQLDatabaseContext is a helper function that gets a SQL database. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLDatabaseContextE

func GetCosmosDBSQLDatabaseContextE(ctx context.Context, subscriptionID string, resourceGroupName string, accountName string, databaseName string) (*armcosmos.SQLDatabaseGetResults, error)

GetCosmosDBSQLDatabaseContextE is a helper function that gets a SQL database. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLDatabaseThroughputContext

func GetCosmosDBSQLDatabaseThroughputContext(t testing.TestingT, ctx context.Context, subscriptionID string, resourceGroupName string, accountName string, databaseName string) *armcosmos.ThroughputSettingsGetResults

GetCosmosDBSQLDatabaseThroughputContext is a helper function that gets a SQL database throughput configuration. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLDatabaseThroughputContextE

func GetCosmosDBSQLDatabaseThroughputContextE(ctx context.Context, subscriptionID string, resourceGroupName string, accountName string, databaseName string) (*armcosmos.ThroughputSettingsGetResults, error)

GetCosmosDBSQLDatabaseThroughputContextE is a helper function that gets a SQL database throughput configuration. The ctx parameter supports cancellation and timeouts.

func GetCosmosDBSQLDatabaseThroughputWithClient

func GetCosmosDBSQLDatabaseThroughputWithClient(ctx context.Context, client *armcosmos.SQLResourcesClient, resourceGroupName string, accountName string, databaseName string) (*armcosmos.ThroughputSettingsGetResults, error)

GetCosmosDBSQLDatabaseThroughputWithClient gets a SQL database throughput configuration using the provided SQLResourcesClient.

func GetCosmosDBSQLDatabaseWithClient

func GetCosmosDBSQLDatabaseWithClient(ctx context.Context, client *armcosmos.SQLResourcesClient, resourceGroupName string, accountName string, databaseName string) (*armcosmos.SQLDatabaseGetResults, error)

GetCosmosDBSQLDatabaseWithClient gets a SQL database using the provided SQLResourcesClient.

func GetCustomNsgRulesClientContext

func GetCustomNsgRulesClientContext(t testing.TestingT, ctx context.Context, subscriptionID string) *armnetwork.SecurityRulesClient

GetCustomNsgRulesClientContext returns a rules client which can be used to read the list of *custom* security rules defined on a network security group. Note that the "custom" rules are those defined by end users. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetCustomNsgRulesClientContextE

func GetCustomNsgRulesClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.SecurityRulesClient, error)

GetCustomNsgRulesClientContextE returns a rules client which can be used to read the list of *custom* security rules defined on a network security group. Note that the "custom" rules are those defined by end users. The ctx parameter supports cancellation and timeouts.

func GetDataFactoryContext

func GetDataFactoryContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, factoryName string) *armdatafactory.Factory

GetDataFactoryContext returns the Data Factory object. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetDataFactoryContextE

func GetDataFactoryContextE(ctx context.Context, subscriptionID string, resGroupName string, factoryName string) (*armdatafactory.Factory, error)

GetDataFactoryContextE returns the Data Factory object. The ctx parameter supports cancellation and timeouts.

func GetDataFactoryWithClient

func GetDataFactoryWithClient(ctx context.Context, client *armdatafactory.FactoriesClient, resGroupName string, factoryName string) (*armdatafactory.Factory, error)

GetDataFactoryWithClient returns a Data Factory using the provided FactoriesClient. This variant is useful for testing with fake clients.

func GetDatabaseClientContext

func GetDatabaseClientContext(ctx context.Context, subscriptionID string) (*armsql.DatabasesClient, error)

GetDatabaseClientContext is a helper function that will setup a sql DB client. The ctx parameter supports cancellation and timeouts.

func GetDefaultNsgRulesClientContext

func GetDefaultNsgRulesClientContext(t testing.TestingT, ctx context.Context, subscriptionID string) *armnetwork.DefaultSecurityRulesClient

GetDefaultNsgRulesClientContext returns a rules client which can be used to read the list of *default* security rules defined on a network security group. Note that the "default" rules are those provided implicitly by the Azure platform. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetDefaultNsgRulesClientContextE

func GetDefaultNsgRulesClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.DefaultSecurityRulesClient, error)

GetDefaultNsgRulesClientContextE returns a rules client which can be used to read the list of *default* security rules defined on a network security group. Note that the "default" rules are those provided implicitly by the Azure platform. The ctx parameter supports cancellation and timeouts.

func GetDiagnosticsSettingsResourceContext

func GetDiagnosticsSettingsResourceContext(t testing.TestingT, ctx context.Context, name string, resourceURI string, subscriptionID string) *armmonitor.DiagnosticSettingsResource

GetDiagnosticsSettingsResourceContext gets the diagnostics settings for a specified resource. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetDiagnosticsSettingsResourceContextE

func GetDiagnosticsSettingsResourceContextE(ctx context.Context, name string, resourceURI string, subscriptionID string) (*armmonitor.DiagnosticSettingsResource, error)

GetDiagnosticsSettingsResourceContextE gets the diagnostics settings for a specified resource. The ctx parameter supports cancellation and timeouts.

func GetDiagnosticsSettingsResourceWithClient

func GetDiagnosticsSettingsResourceWithClient(ctx context.Context, client *armmonitor.DiagnosticSettingsClient, resourceURI string, name string) (*armmonitor.DiagnosticSettingsResource, error)

GetDiagnosticsSettingsResourceWithClient gets the diagnostics settings for a specified resource using the provided client.

func GetDiskContext

func GetDiskContext(t testing.TestingT, ctx context.Context, diskName string, resGroupName string, subscriptionID string) *armcompute.Disk

GetDiskContext returns a Disk in the specified Azure Resource Group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetDiskContextE

func GetDiskContextE(ctx context.Context, diskName string, resGroupName string, subscriptionID string) (*armcompute.Disk, error)

GetDiskContextE returns a Disk in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetDiskWithClient

func GetDiskWithClient(ctx context.Context, client *armcompute.DisksClient, resGroupName string, diskName string) (*armcompute.Disk, error)

GetDiskWithClient returns a Disk using the provided DisksClient.

func GetFrontDoorContext

func GetFrontDoorContext(t testing.TestingT, ctx context.Context, frontDoorName string, resourceGroupName string, subscriptionID string) *armfrontdoor.FrontDoor

GetFrontDoorContext gets a Front Door by name if it exists for the subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetFrontDoorContextE

func GetFrontDoorContextE(ctx context.Context, frontDoorName, resourceGroupName, subscriptionID string) (*armfrontdoor.FrontDoor, error)

GetFrontDoorContextE gets the specified Front Door if it exists. The ctx parameter supports cancellation and timeouts.

func GetFrontDoorFrontendEndpointContext

func GetFrontDoorFrontendEndpointContext(t testing.TestingT, ctx context.Context, endpointName string, frontDoorName string, resourceGroupName string, subscriptionID string) *armfrontdoor.FrontendEndpoint

GetFrontDoorFrontendEndpointContext gets a frontend endpoint by name for the provided Front Door if it exists for the subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetFrontDoorFrontendEndpointContextE

func GetFrontDoorFrontendEndpointContextE(ctx context.Context, endpointName, frontDoorName, resourceGroupName, subscriptionID string) (*armfrontdoor.FrontendEndpoint, error)

GetFrontDoorFrontendEndpointContextE gets the specified Frontend Endpoint for the provided Front Door if it exists. The ctx parameter supports cancellation and timeouts.

func GetFrontDoorFrontendEndpointWithClient

func GetFrontDoorFrontendEndpointWithClient(ctx context.Context, client *armfrontdoor.FrontendEndpointsClient, resourceGroupName, frontDoorName, endpointName string) (*armfrontdoor.FrontendEndpoint, error)

GetFrontDoorFrontendEndpointWithClient gets the specified Frontend Endpoint using the provided client. This variant is useful for testing with fake clients.

func GetFrontDoorWithClient

func GetFrontDoorWithClient(ctx context.Context, client *armfrontdoor.FrontDoorsClient, resourceGroupName, frontDoorName string) (*armfrontdoor.FrontDoor, error)

GetFrontDoorWithClient gets the specified Front Door using the provided client. This variant is useful for testing with fake clients.

func GetIPOfPublicIPAddressByNameContext

func GetIPOfPublicIPAddressByNameContext(t testing.TestingT, ctx context.Context, publicAddressName string, resGroupName string, subscriptionID string) string

GetIPOfPublicIPAddressByNameContext gets the IP of the specified Public IP Address. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetIPOfPublicIPAddressByNameContextE

func GetIPOfPublicIPAddressByNameContextE(ctx context.Context, publicAddressName string, resGroupName string, subscriptionID string) (string, error)

GetIPOfPublicIPAddressByNameContextE gets the IP of the specified Public IP Address. The ctx parameter supports cancellation and timeouts.

func GetKeyVaultCertificatesClientContextE

func GetKeyVaultCertificatesClientContextE(_ context.Context, keyVaultName string) (*azcertificates.Client, error)

GetKeyVaultCertificatesClientContextE creates a KeyVault certificates client. The ctx parameter supports cancellation and timeouts.

func GetKeyVaultContext

func GetKeyVaultContext(t testing.TestingT, ctx context.Context, resGroupName string, keyVaultName string, subscriptionID string) *armkeyvault.Vault

GetKeyVaultContext is a helper function that gets the keyvault management object. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetKeyVaultContextE

func GetKeyVaultContextE(t testing.TestingT, ctx context.Context, resGroupName string, keyVaultName string, subscriptionID string) (*armkeyvault.Vault, error)

GetKeyVaultContextE is a helper function that gets the keyvault management object. The ctx parameter supports cancellation and timeouts.

func GetKeyVaultKeysClientContextE

func GetKeyVaultKeysClientContextE(_ context.Context, keyVaultName string) (*azkeys.Client, error)

GetKeyVaultKeysClientContextE creates a KeyVault keys client. The ctx parameter supports cancellation and timeouts.

func GetKeyVaultManagementClientContextE

func GetKeyVaultManagementClientContextE(_ context.Context, subscriptionID string) (*armkeyvault.VaultsClient, error)

GetKeyVaultManagementClientContextE is a helper function that will setup a key vault management client. The ctx parameter supports cancellation and timeouts.

func GetKeyVaultSecretsClientContextE

func GetKeyVaultSecretsClientContextE(_ context.Context, keyVaultName string) (*azsecrets.Client, error)

GetKeyVaultSecretsClientContextE creates a KeyVault secrets client. The ctx parameter supports cancellation and timeouts.

func GetKeyVaultURISuffixContextE

func GetKeyVaultURISuffixContextE(_ context.Context) (string, error)

GetKeyVaultURISuffixContextE returns the proper KeyVault URI suffix for the configured Azure environment. The ctx parameter supports cancellation and timeouts.

func GetKeyVaultWithClient

func GetKeyVaultWithClient(ctx context.Context, client *armkeyvault.VaultsClient, resGroupName string, keyVaultName string) (*armkeyvault.Vault, error)

GetKeyVaultWithClient gets the specified Key Vault using the provided VaultsClient. This variant is useful for testing with fake clients.

func GetLoadBalancerClientContextE

func GetLoadBalancerClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.LoadBalancersClient, error)

GetLoadBalancerClientContextE gets a new Load Balancer client in the specified Azure Subscription. The ctx parameter supports cancellation and timeouts.

func GetLoadBalancerContext

func GetLoadBalancerContext(t testing.TestingT, ctx context.Context, loadBalancerName string, resourceGroupName string, subscriptionID string) *armnetwork.LoadBalancer

GetLoadBalancerContext gets a Load Balancer network resource in the specified Azure Resource Group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetLoadBalancerContextE

func GetLoadBalancerContextE(ctx context.Context, loadBalancerName string, resourceGroupName string, subscriptionID string) (*armnetwork.LoadBalancer, error)

GetLoadBalancerContextE gets a Load Balancer network resource in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetLoadBalancerFrontendIPConfigClientContextE

func GetLoadBalancerFrontendIPConfigClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.LoadBalancerFrontendIPConfigurationsClient, error)

GetLoadBalancerFrontendIPConfigClientContextE gets a new Load Balancer Frontend IP Configuration client in the specified Azure Subscription. The ctx parameter supports cancellation and timeouts.

func GetLoadBalancerFrontendIPConfigContext

func GetLoadBalancerFrontendIPConfigContext(t testing.TestingT, ctx context.Context, feConfigName string, loadBalancerName string, resourceGroupName string, subscriptionID string) *armnetwork.FrontendIPConfiguration

GetLoadBalancerFrontendIPConfigContext gets the specified Load Balancer Frontend IP Configuration network resource. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetLoadBalancerFrontendIPConfigContextE

func GetLoadBalancerFrontendIPConfigContextE(ctx context.Context, feConfigName string, loadBalancerName string, resourceGroupName string, subscriptionID string) (*armnetwork.FrontendIPConfiguration, error)

GetLoadBalancerFrontendIPConfigContextE gets the specified Load Balancer Frontend IP Configuration network resource. The ctx parameter supports cancellation and timeouts.

func GetLoadBalancerFrontendIPConfigNamesContext

func GetLoadBalancerFrontendIPConfigNamesContext(t testing.TestingT, ctx context.Context, loadBalancerName string, resourceGroupName string, subscriptionID string) []string

GetLoadBalancerFrontendIPConfigNamesContext gets a list of the Frontend IP Configuration Names for the Load Balancer. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetLoadBalancerFrontendIPConfigNamesContextE

func GetLoadBalancerFrontendIPConfigNamesContextE(ctx context.Context, loadBalancerName string, resourceGroupName string, subscriptionID string) ([]string, error)

GetLoadBalancerFrontendIPConfigNamesContextE gets a list of the Frontend IP Configuration Names for the Load Balancer. The ctx parameter supports cancellation and timeouts.

func GetLoadBalancerFrontendIPConfigWithClient

func GetLoadBalancerFrontendIPConfigWithClient(ctx context.Context, client *armnetwork.LoadBalancerFrontendIPConfigurationsClient, resourceGroupName string, loadBalancerName string, feConfigName string) (*armnetwork.FrontendIPConfiguration, error)

GetLoadBalancerFrontendIPConfigWithClient gets the specified Load Balancer Frontend IP Configuration using the provided LoadBalancerFrontendIPConfigurationsClient.

func GetLoadBalancerWithClient

func GetLoadBalancerWithClient(ctx context.Context, client *armnetwork.LoadBalancersClient, resourceGroupName string, loadBalancerName string) (*armnetwork.LoadBalancer, error)

GetLoadBalancerWithClient gets a Load Balancer using the provided LoadBalancersClient.

func GetLogAnalyticsWorkspaceContext

func GetLogAnalyticsWorkspaceContext(t testing.TestingT, ctx context.Context, workspaceName string, resourceGroupName string, subscriptionID string) *armoperationalinsights.Workspace

GetLogAnalyticsWorkspaceContext gets an operational insights workspace if it exists in a subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetLogAnalyticsWorkspaceContextE

func GetLogAnalyticsWorkspaceContextE(ctx context.Context, workspaceName, resourceGroupName, subscriptionID string) (*armoperationalinsights.Workspace, error)

GetLogAnalyticsWorkspaceContextE gets an operational insights workspace if it exists in a subscription. The ctx parameter supports cancellation and timeouts.

func GetLogAnalyticsWorkspaceWithClient

func GetLogAnalyticsWorkspaceWithClient(ctx context.Context, client *armoperationalinsights.WorkspacesClient, resourceGroupName string, workspaceName string) (*armoperationalinsights.Workspace, error)

GetLogAnalyticsWorkspaceWithClient gets an operational insights workspace using the provided WorkspacesClient.

func GetMYSQLDBClientContextE

func GetMYSQLDBClientContextE(_ context.Context, subscriptionID string) (*armmysql.DatabasesClient, error)

GetMYSQLDBClientContextE is a helper function that will setup a mysql DB client. The ctx parameter supports cancellation and timeouts.

func GetMYSQLDBContext

func GetMYSQLDBContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string, dbName string) *armmysql.Database

GetMYSQLDBContext is a helper function that gets the database. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetMYSQLDBContextE

func GetMYSQLDBContextE(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string, dbName string) (*armmysql.Database, error)

GetMYSQLDBContextE is a helper function that gets the database. The ctx parameter supports cancellation and timeouts.

func GetMYSQLDBWithClient

func GetMYSQLDBWithClient(ctx context.Context, client *armmysql.DatabasesClient, resGroupName string, serverName string, dbName string) (*armmysql.Database, error)

GetMYSQLDBWithClient gets the database using the provided DatabasesClient.

func GetMYSQLServerClientContextE

func GetMYSQLServerClientContextE(_ context.Context, subscriptionID string) (*armmysql.ServersClient, error)

GetMYSQLServerClientContextE is a helper function that will setup a mysql server client. The ctx parameter supports cancellation and timeouts.

func GetMYSQLServerContext

func GetMYSQLServerContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) *armmysql.Server

GetMYSQLServerContext is a helper function that gets the server. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetMYSQLServerContextE

func GetMYSQLServerContextE(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) (*armmysql.Server, error)

GetMYSQLServerContextE is a helper function that gets the server. The ctx parameter supports cancellation and timeouts.

func GetMYSQLServerWithClient

func GetMYSQLServerWithClient(ctx context.Context, client *armmysql.ServersClient, resGroupName string, serverName string) (*armmysql.Server, error)

GetMYSQLServerWithClient gets the server using the provided ServersClient.

func GetManagedClusterContext

func GetManagedClusterContext(t testing.TestingT, ctx context.Context, resourceGroupName, clusterName, subscriptionID string) *armcontainerservice.ManagedCluster

GetManagedClusterContext returns a ManagedCluster for the specified cluster in the given resource group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetManagedClusterContextE

func GetManagedClusterContextE(t testing.TestingT, ctx context.Context, resourceGroupName, clusterName, subscriptionID string) (*armcontainerservice.ManagedCluster, error)

GetManagedClusterContextE returns a ManagedCluster for the specified cluster in the given resource group. The ctx parameter supports cancellation and timeouts.

func GetManagedClusterWithClient

func GetManagedClusterWithClient(ctx context.Context, client *armcontainerservice.ManagedClustersClient, resourceGroupName string, clusterName string) (*armcontainerservice.ManagedCluster, error)

GetManagedClusterWithClient returns a ManagedCluster using the provided ManagedClustersClient.

func GetManagedEnvironmentContext

func GetManagedEnvironmentContext(t testing.TestingT, ctx context.Context, environmentName string, resourceGroupName string, subscriptionID string) *armappcontainers.ManagedEnvironment

GetManagedEnvironmentContext returns the Managed Environment object. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetManagedEnvironmentContextE

func GetManagedEnvironmentContextE(ctx context.Context, environmentName string, resourceGroupName string, subscriptionID string) (*armappcontainers.ManagedEnvironment, error)

GetManagedEnvironmentContextE returns the Managed Environment object. The ctx parameter supports cancellation and timeouts.

func GetManagedEnvironmentWithClient

func GetManagedEnvironmentWithClient(ctx context.Context, client *armappcontainers.ManagedEnvironmentsClient, resourceGroupName string, environmentName string) (*armappcontainers.ManagedEnvironment, error)

GetManagedEnvironmentWithClient returns a Managed Environment using the provided ManagedEnvironmentsClient. This variant is useful for testing with fake clients.

func GetManagedInstanceContext

func GetManagedInstanceContext(t testing.TestingT, ctx context.Context, resGroupName string, managedInstanceName string, subscriptionID string) *armsql.ManagedInstance

GetManagedInstanceContext retrieves the SQL managed instance object for the given subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetManagedInstanceContextE

func GetManagedInstanceContextE(ctx context.Context, subscriptionID string, resGroupName string, managedInstanceName string) (*armsql.ManagedInstance, error)

GetManagedInstanceContextE retrieves the SQL managed instance object for the given subscription. The ctx parameter supports cancellation and timeouts.

func GetManagedInstanceDatabaseContext

func GetManagedInstanceDatabaseContext(t testing.TestingT, ctx context.Context, resGroupName string, managedInstanceName string, databaseName string, subscriptionID string) *armsql.ManagedDatabase

GetManagedInstanceDatabaseContext retrieves the SQL managed database object for the given subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetManagedInstanceDatabaseContextE

func GetManagedInstanceDatabaseContextE(ctx context.Context, subscriptionID string, resGroupName string, managedInstanceName string, databaseName string) (*armsql.ManagedDatabase, error)

GetManagedInstanceDatabaseContextE retrieves the SQL managed database object for the given subscription. The ctx parameter supports cancellation and timeouts.

func GetManagedInstanceDatabaseWithClient

func GetManagedInstanceDatabaseWithClient(ctx context.Context, client *armsql.ManagedDatabasesClient, resGroupName string, managedInstanceName string, databaseName string) (*armsql.ManagedDatabase, error)

GetManagedInstanceDatabaseWithClient retrieves the SQL managed database using the provided ManagedDatabasesClient.

func GetManagedInstanceWithClient

func GetManagedInstanceWithClient(ctx context.Context, client *armsql.ManagedInstancesClient, resGroupName string, managedInstanceName string) (*armsql.ManagedInstance, error)

GetManagedInstanceWithClient retrieves the SQL managed instance using the provided ManagedInstancesClient.

func GetNameFromResourceID

func GetNameFromResourceID(resourceID string) string

GetNameFromResourceID gets the Name from an Azure Resource ID.

func GetNameFromResourceIDE

func GetNameFromResourceIDE(resourceID string) (string, error)

GetNameFromResourceIDE gets the Name from an Azure Resource ID. This function would fail the test if there is an error.

func GetNetworkInterfaceClientContextE

func GetNetworkInterfaceClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.InterfacesClient, error)

GetNetworkInterfaceClientContextE creates a new Network Interface client in the specified Azure Subscription. The ctx parameter supports cancellation and timeouts.

func GetNetworkInterfaceConfigurationClientContextE

func GetNetworkInterfaceConfigurationClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.InterfaceIPConfigurationsClient, error)

GetNetworkInterfaceConfigurationClientContextE creates a new Network Interface Configuration client in the specified Azure Subscription. The ctx parameter supports cancellation and timeouts.

func GetNetworkInterfaceConfigurationContextE

func GetNetworkInterfaceConfigurationContextE(ctx context.Context, nicName string, nicConfigName string, resGroupName string, subscriptionID string) (*armnetwork.InterfaceIPConfiguration, error)

GetNetworkInterfaceConfigurationContextE gets a Network Interface Configuration in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetNetworkInterfaceContextE

func GetNetworkInterfaceContextE(ctx context.Context, nicName string, resGroupName string, subscriptionID string) (*armnetwork.Interface, error)

GetNetworkInterfaceContextE gets a Network Interface in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetNetworkInterfacePrivateIPsContext

func GetNetworkInterfacePrivateIPsContext(t testing.TestingT, ctx context.Context, nicName string, resGroupName string, subscriptionID string) []string

GetNetworkInterfacePrivateIPsContext gets a list of the Private IPs of a Network Interface configs. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetNetworkInterfacePrivateIPsContextE

func GetNetworkInterfacePrivateIPsContextE(ctx context.Context, nicName string, resGroupName string, subscriptionID string) ([]string, error)

GetNetworkInterfacePrivateIPsContextE gets a list of the Private IPs of a Network Interface configs. The ctx parameter supports cancellation and timeouts.

func GetNetworkInterfacePublicIPsContext

func GetNetworkInterfacePublicIPsContext(t testing.TestingT, ctx context.Context, nicName string, resGroupName string, subscriptionID string) []string

GetNetworkInterfacePublicIPsContext returns a list of all the Public IPs found in the Network Interface configurations. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetNetworkInterfacePublicIPsContextE

func GetNetworkInterfacePublicIPsContextE(ctx context.Context, nicName string, resGroupName string, subscriptionID string) ([]string, error)

GetNetworkInterfacePublicIPsContextE returns a list of all the Public IPs found in the Network Interface configurations. The ctx parameter supports cancellation and timeouts.

func GetNetworkInterfaceWithClient

func GetNetworkInterfaceWithClient(ctx context.Context, client *armnetwork.InterfacesClient, resGroupName string, nicName string) (*armnetwork.Interface, error)

GetNetworkInterfaceWithClient gets a Network Interface using the provided InterfacesClient.

func GetPostgreSQLDBClientContextE

func GetPostgreSQLDBClientContextE(_ context.Context, subscriptionID string) (*armpostgresql.DatabasesClient, error)

GetPostgreSQLDBClientContextE is a helper function that will setup a postgresql DB client. The ctx parameter supports cancellation and timeouts.

func GetPostgreSQLDBContext

func GetPostgreSQLDBContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string, dbName string) *armpostgresql.Database

GetPostgreSQLDBContext is a helper function that gets the database. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetPostgreSQLDBContextE

func GetPostgreSQLDBContextE(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string, dbName string) (*armpostgresql.Database, error)

GetPostgreSQLDBContextE is a helper function that gets the database. The ctx parameter supports cancellation and timeouts.

func GetPostgreSQLDBWithClient

func GetPostgreSQLDBWithClient(ctx context.Context, client *armpostgresql.DatabasesClient, resGroupName string, serverName string, dbName string) (*armpostgresql.Database, error)

GetPostgreSQLDBWithClient gets the database using the provided DatabasesClient.

func GetPostgreSQLServerClientContextE

func GetPostgreSQLServerClientContextE(_ context.Context, subscriptionID string) (*armpostgresql.ServersClient, error)

GetPostgreSQLServerClientContextE is a helper function that will setup a postgresql server client. The ctx parameter supports cancellation and timeouts.

func GetPostgreSQLServerContext

func GetPostgreSQLServerContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) *armpostgresql.Server

GetPostgreSQLServerContext is a helper function that gets the server. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetPostgreSQLServerContextE

func GetPostgreSQLServerContextE(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) (*armpostgresql.Server, error)

GetPostgreSQLServerContextE is a helper function that gets the server. The ctx parameter supports cancellation and timeouts.

func GetPostgreSQLServerWithClient

func GetPostgreSQLServerWithClient(ctx context.Context, client *armpostgresql.ServersClient, resGroupName string, serverName string) (*armpostgresql.Server, error)

GetPostgreSQLServerWithClient gets the server using the provided ServersClient.

func GetPrivateDNSZoneContextE

func GetPrivateDNSZoneContextE(ctx context.Context, zoneName string, resGroupName string, subscriptionID string) (*armprivatedns.PrivateZone, error)

GetPrivateDNSZoneContextE gets the specified private DNS zone object. The ctx parameter supports cancellation and timeouts.

func GetPrivateDNSZoneWithClient

func GetPrivateDNSZoneWithClient(ctx context.Context, client *armprivatedns.PrivateZonesClient, resGroupName string, zoneName string) (*armprivatedns.PrivateZone, error)

GetPrivateDNSZoneWithClient gets the specified private DNS zone using the provided PrivateZonesClient. This variant is useful for testing with fake clients.

func GetPublicIPAddressClientContextE

func GetPublicIPAddressClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.PublicIPAddressesClient, error)

GetPublicIPAddressClientContextE creates a Public IP Addresses client in the specified Azure Subscription. The ctx parameter supports cancellation and timeouts.

func GetPublicIPAddressContextE

func GetPublicIPAddressContextE(ctx context.Context, publicIPAddressName string, resGroupName string, subscriptionID string) (*armnetwork.PublicIPAddress, error)

GetPublicIPAddressContextE gets a Public IP Address in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetPublicIPAddressWithClient

func GetPublicIPAddressWithClient(ctx context.Context, client *armnetwork.PublicIPAddressesClient, resGroupName string, publicIPAddressName string) (*armnetwork.PublicIPAddress, error)

GetPublicIPAddressWithClient gets a Public IP Address using the provided PublicIPAddressesClient.

func GetRandomRegionContext

func GetRandomRegionContext(t testing.TestingT, ctx context.Context, approvedRegions []string, forbiddenRegions []string, subscriptionID string) string

GetRandomRegionContext gets a randomly chosen Azure region. If approvedRegions is not empty, this will be a region from the approvedRegions list; otherwise, this method will fetch the latest list of regions from the Azure APIs and pick one of those. If forbiddenRegions is not empty, this method will make sure the returned region is not in the forbiddenRegions list. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetRandomRegionContextE

func GetRandomRegionContextE(t testing.TestingT, ctx context.Context, approvedRegions []string, forbiddenRegions []string, subscriptionID string) (string, error)

GetRandomRegionContextE gets a randomly chosen Azure region. If approvedRegions is not empty, this will be a region from the approvedRegions list; otherwise, this method will fetch the latest list of regions from the Azure APIs and pick one of those. If forbiddenRegions is not empty, this method will make sure the returned region is not in the forbiddenRegions list. The ctx parameter supports cancellation and timeouts.

func GetRandomStableRegionContext

func GetRandomStableRegionContext(t testing.TestingT, ctx context.Context, approvedRegions []string, forbiddenRegions []string, subscriptionID string) string

GetRandomStableRegionContext gets a randomly chosen Azure region that is considered stable. Like GetRandomRegionContext, you can further restrict the stable region list using approvedRegions and forbiddenRegions. We consider stable regions to be those that have been around for at least 1 year. Note that regions in the approvedRegions list that are not considered stable are ignored. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetRecoveryServicesVaultBackupPolicyListContext

func GetRecoveryServicesVaultBackupPolicyListContext(t testing.TestingT, ctx context.Context, vaultName, resourceGroupName, subscriptionID string) map[string]armrecoveryservicesbackup.ProtectionPolicyResource

GetRecoveryServicesVaultBackupPolicyListContext returns a list of backup policies for the given vault. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetRecoveryServicesVaultBackupPolicyListContextE

func GetRecoveryServicesVaultBackupPolicyListContextE(ctx context.Context, vaultName, resourceGroupName, subscriptionID string) (map[string]armrecoveryservicesbackup.ProtectionPolicyResource, error)

GetRecoveryServicesVaultBackupPolicyListContextE returns a list of backup policies for the given vault. The ctx parameter supports cancellation and timeouts.

func GetRecoveryServicesVaultBackupProtectedVMListContext

func GetRecoveryServicesVaultBackupProtectedVMListContext(t testing.TestingT, ctx context.Context, policyName, vaultName, resourceGroupName, subscriptionID string) map[string]armrecoveryservicesbackup.AzureIaaSComputeVMProtectedItem

GetRecoveryServicesVaultBackupProtectedVMListContext returns a list of protected VMs on the given vault and policy. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetRecoveryServicesVaultBackupProtectedVMListContextE

func GetRecoveryServicesVaultBackupProtectedVMListContextE(ctx context.Context, policyName, vaultName, resourceGroupName, subscriptionID string) (map[string]armrecoveryservicesbackup.AzureIaaSComputeVMProtectedItem, error)

GetRecoveryServicesVaultBackupProtectedVMListContextE returns a list of protected VMs on the given vault and policy. The ctx parameter supports cancellation and timeouts.

func GetRecoveryServicesVaultContextE

func GetRecoveryServicesVaultContextE(ctx context.Context, vaultName, resourceGroupName, subscriptionID string) (*armrecoveryservices.Vault, error)

GetRecoveryServicesVaultContextE returns a recovery services vault instance. The ctx parameter supports cancellation and timeouts.

func GetRecoveryServicesVaultWithClient

func GetRecoveryServicesVaultWithClient(ctx context.Context, client *armrecoveryservices.VaultsClient, resourceGroupName, vaultName string) (*armrecoveryservices.Vault, error)

GetRecoveryServicesVaultWithClient retrieves a recovery services vault using the provided client.

func GetResourceGroupContextE

func GetResourceGroupContextE(ctx context.Context, resourceGroupName, subscriptionID string) (bool, error)

GetResourceGroupContextE checks whether a resource group name matches the one retrieved from the subscription. Azure resource group names are case-insensitive, so the comparison is performed with EqualFold. The ctx parameter supports cancellation and timeouts.

func GetSQLDatabaseContext

func GetSQLDatabaseContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string, dbName string) *armsql.Database

GetSQLDatabaseContext is a helper function that gets the sql db. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetSQLDatabaseContextE

func GetSQLDatabaseContextE(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string, dbName string) (*armsql.Database, error)

GetSQLDatabaseContextE is a helper function that gets the sql db. The ctx parameter supports cancellation and timeouts.

func GetSQLDatabaseWithClient

func GetSQLDatabaseWithClient(ctx context.Context, client *armsql.DatabasesClient, resGroupName string, serverName string, dbName string) (*armsql.Database, error)

GetSQLDatabaseWithClient gets the sql db using the provided DatabasesClient.

func GetSQLServerClientContext

func GetSQLServerClientContext(ctx context.Context, subscriptionID string) (*armsql.ServersClient, error)

GetSQLServerClientContext is a helper function that will setup a sql server client. The ctx parameter supports cancellation and timeouts.

func GetSQLServerContext

func GetSQLServerContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) *armsql.Server

GetSQLServerContext is a helper function that gets the sql server object. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetSQLServerContextE

func GetSQLServerContextE(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) (*armsql.Server, error)

GetSQLServerContextE is a helper function that gets the sql server object. The ctx parameter supports cancellation and timeouts.

func GetSQLServerWithClient

func GetSQLServerWithClient(ctx context.Context, client *armsql.ServersClient, resGroupName string, serverName string) (*armsql.Server, error)

GetSQLServerWithClient gets the sql server object using the provided ServersClient.

func GetSizeOfVirtualMachineContext

func GetSizeOfVirtualMachineContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) armcompute.VirtualMachineSizeTypes

GetSizeOfVirtualMachineContext gets the Size Type of the specified Azure Virtual Machine. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetSizeOfVirtualMachineContextE

func GetSizeOfVirtualMachineContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) (armcompute.VirtualMachineSizeTypes, error)

GetSizeOfVirtualMachineContextE gets the Size Type of the specified Azure Virtual Machine. The ctx parameter supports cancellation and timeouts.

func GetStorageAccountContextE

func GetStorageAccountContextE(ctx context.Context, storageAccountName, resourceGroupName, subscriptionID string) (*armstorage.Account, error)

GetStorageAccountContextE gets a storage account; otherwise error. See https://docs.microsoft.com/rest/api/storagerp/storageaccounts/getproperties for more information. The ctx parameter supports cancellation and timeouts.

func GetStorageAccountKindContext

func GetStorageAccountKindContext(t testing.TestingT, ctx context.Context, storageAccountName string, resourceGroupName string, subscriptionID string) string

GetStorageAccountKindContext returns one of Storage, StorageV2, BlobStorage, FileStorage, or BlockBlobStorage. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetStorageAccountKindContextE

func GetStorageAccountKindContextE(ctx context.Context, storageAccountName, resourceGroupName, subscriptionID string) (string, error)

GetStorageAccountKindContextE returns one of Storage, StorageV2, BlobStorage, FileStorage, or BlockBlobStorage. The ctx parameter supports cancellation and timeouts.

func GetStorageAccountPrimaryBlobEndpointContextE

func GetStorageAccountPrimaryBlobEndpointContextE(ctx context.Context, storageAccountName, resourceGroupName, subscriptionID string) (string, error)

GetStorageAccountPrimaryBlobEndpointContextE gets the storage account blob endpoint as URI string. The ctx parameter supports cancellation and timeouts.

func GetStorageAccountPropertyContextE

func GetStorageAccountPropertyContextE(ctx context.Context, storageAccountName, resourceGroupName, subscriptionID string) (*armstorage.Account, error)

GetStorageAccountPropertyContextE returns StorageAccount properties. The ctx parameter supports cancellation and timeouts.

func GetStorageAccountSkuTierContext

func GetStorageAccountSkuTierContext(t testing.TestingT, ctx context.Context, storageAccountName string, resourceGroupName string, subscriptionID string) string

GetStorageAccountSkuTierContext returns the storage account sku tier as Standard or Premium. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetStorageAccountSkuTierContextE

func GetStorageAccountSkuTierContextE(ctx context.Context, storageAccountName, resourceGroupName, subscriptionID string) (string, error)

GetStorageAccountSkuTierContextE returns the storage account sku tier as Standard or Premium. The ctx parameter supports cancellation and timeouts.

func GetStorageBlobContainerContextE

func GetStorageBlobContainerContextE(ctx context.Context, containerName, storageAccountName, resourceGroupName, subscriptionID string) (*armstorage.BlobContainer, error)

GetStorageBlobContainerContextE returns the Blob container client. The ctx parameter supports cancellation and timeouts.

func GetStorageBlobContainerPublicAccessContext

func GetStorageBlobContainerPublicAccessContext(t testing.TestingT, ctx context.Context, containerName string, storageAccountName string, resourceGroupName string, subscriptionID string) bool

GetStorageBlobContainerPublicAccessContext indicates whether a storage container has public access; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetStorageBlobContainerPublicAccessContextE

func GetStorageBlobContainerPublicAccessContextE(ctx context.Context, containerName, storageAccountName, resourceGroupName, subscriptionID string) (bool, error)

GetStorageBlobContainerPublicAccessContextE indicates whether a storage container has public access; otherwise false. The ctx parameter supports cancellation and timeouts.

func GetStorageDNSStringContext

func GetStorageDNSStringContext(t testing.TestingT, ctx context.Context, storageAccountName string, resourceGroupName string, subscriptionID string) string

GetStorageDNSStringContext builds and returns the storage account dns string if the storage account exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetStorageDNSStringContextE

func GetStorageDNSStringContextE(ctx context.Context, storageAccountName, resourceGroupName, subscriptionID string) (string, error)

GetStorageDNSStringContextE builds and returns the storage account dns string if the storage account exists. The ctx parameter supports cancellation and timeouts.

func GetStorageFileShareContext

func GetStorageFileShareContext(t testing.TestingT, ctx context.Context, fileShareName, storageAccountName, resourceGroupName, subscriptionID string) *armstorage.FileShare

GetStorageFileShareContext returns the specified file share. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetStorageFileShareContextE

func GetStorageFileShareContextE(ctx context.Context, fileShareName, storageAccountName, resourceGroupName, subscriptionID string) (*armstorage.FileShare, error)

GetStorageFileShareContextE returns the specified file share. The ctx parameter supports cancellation and timeouts.

func GetStorageURISuffixContextE

func GetStorageURISuffixContextE(_ context.Context) (string, error)

GetStorageURISuffixContextE returns the proper storage URI suffix for the configured Azure environment. The ctx parameter supports cancellation and timeouts.

func GetSubnetClientContextE

func GetSubnetClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.SubnetsClient, error)

GetSubnetClientContextE creates a subnet client. The ctx parameter supports cancellation and timeouts.

func GetSubnetContextE

func GetSubnetContextE(ctx context.Context, subnetName string, vnetName string, resGroupName string, subscriptionID string) (*armnetwork.Subnet, error)

GetSubnetContextE gets a subnet. The ctx parameter supports cancellation and timeouts.

func GetSubnetWithClient

func GetSubnetWithClient(ctx context.Context, client *armnetwork.SubnetsClient, resGroupName string, vnetName string, subnetName string) (*armnetwork.Subnet, error)

GetSubnetWithClient gets a subnet using the provided SubnetsClient.

func GetSynapseSQLPoolContext

func GetSynapseSQLPoolContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, workspaceName string, sqlPoolName string) *armsynapse.SQLPool

GetSynapseSQLPoolContext retrieves the synapse SQL pool for the given subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetSynapseSQLPoolContextE

func GetSynapseSQLPoolContextE(ctx context.Context, subscriptionID string, resGroupName string, workspaceName string, sqlPoolName string) (*armsynapse.SQLPool, error)

GetSynapseSQLPoolContextE retrieves the synapse SQL pool for the given subscription. The ctx parameter supports cancellation and timeouts.

func GetSynapseSQLPoolWithClient

func GetSynapseSQLPoolWithClient(ctx context.Context, client *armsynapse.SQLPoolsClient, resGroupName string, workspaceName string, sqlPoolName string) (*armsynapse.SQLPool, error)

GetSynapseSQLPoolWithClient retrieves the synapse SQL pool using the provided SQLPoolsClient.

func GetSynapseWorkspaceContext

func GetSynapseWorkspaceContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, workspaceName string) *armsynapse.Workspace

GetSynapseWorkspaceContext retrieves the synapse workspace for the given subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetSynapseWorkspaceContextE

func GetSynapseWorkspaceContextE(ctx context.Context, subscriptionID string, resGroupName string, workspaceName string) (*armsynapse.Workspace, error)

GetSynapseWorkspaceContextE retrieves the synapse workspace for the given subscription. The ctx parameter supports cancellation and timeouts.

func GetSynapseWorkspaceWithClient

func GetSynapseWorkspaceWithClient(ctx context.Context, client *armsynapse.WorkspacesClient, resGroupName string, workspaceName string) (*armsynapse.Workspace, error)

GetSynapseWorkspaceWithClient retrieves the synapse workspace using the provided WorkspacesClient.

func GetVMInsightsOnboardingStatusContext

func GetVMInsightsOnboardingStatusContext(t testing.TestingT, ctx context.Context, resourceURI string, subscriptionID string) *armmonitor.VMInsightsOnboardingStatus

GetVMInsightsOnboardingStatusContext gets diagnostics VM onboarding status. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVMInsightsOnboardingStatusContextE

func GetVMInsightsOnboardingStatusContextE(t testing.TestingT, ctx context.Context, resourceURI string, subscriptionID string) (*armmonitor.VMInsightsOnboardingStatus, error)

GetVMInsightsOnboardingStatusContextE gets diagnostics VM onboarding status. The ctx parameter supports cancellation and timeouts.

func GetVMInsightsOnboardingStatusWithClient

func GetVMInsightsOnboardingStatusWithClient(ctx context.Context, client *armmonitor.VMInsightsClient, resourceURI string) (*armmonitor.VMInsightsOnboardingStatus, error)

GetVMInsightsOnboardingStatusWithClient gets diagnostics VM onboarding status using the provided client.

func GetVirtualMachineAvailabilitySetIDContext

func GetVirtualMachineAvailabilitySetIDContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) string

GetVirtualMachineAvailabilitySetIDContext gets the Availability Set ID of the specified Azure Virtual Machine. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineAvailabilitySetIDContextE

func GetVirtualMachineAvailabilitySetIDContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) (string, error)

GetVirtualMachineAvailabilitySetIDContextE gets the Availability Set ID of the specified Azure Virtual Machine. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineClientContext

func GetVirtualMachineClientContext(t testing.TestingT, ctx context.Context, subscriptionID string) *armcompute.VirtualMachinesClient

GetVirtualMachineClientContext is a helper function that will setup an Azure Virtual Machine client on your behalf. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineClientContextE

func GetVirtualMachineClientContextE(ctx context.Context, subscriptionID string) (*armcompute.VirtualMachinesClient, error)

GetVirtualMachineClientContextE is a helper function that will setup an Azure Virtual Machine client on your behalf. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineContext

func GetVirtualMachineContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) *armcompute.VirtualMachine

GetVirtualMachineContext gets a Virtual Machine in the specified Azure Resource Group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineContextE

func GetVirtualMachineContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) (*armcompute.VirtualMachine, error)

GetVirtualMachineContextE gets a Virtual Machine in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineManagedDisksContext

func GetVirtualMachineManagedDisksContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) []string

GetVirtualMachineManagedDisksContext gets the list of Managed Disk names of the specified Azure Virtual Machine. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineManagedDisksContextE

func GetVirtualMachineManagedDisksContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) ([]string, error)

GetVirtualMachineManagedDisksContextE gets the list of Managed Disk names of the specified Azure Virtual Machine. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineNicsContext

func GetVirtualMachineNicsContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) []string

GetVirtualMachineNicsContext gets a list of Network Interface names for a specified Azure Virtual Machine. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineNicsContextE

func GetVirtualMachineNicsContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) ([]string, error)

GetVirtualMachineNicsContextE gets a list of Network Interface names for a specified Azure Virtual Machine. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineOSDiskNameContext

func GetVirtualMachineOSDiskNameContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) string

GetVirtualMachineOSDiskNameContext gets the OS Disk name of the specified Azure Virtual Machine. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineOSDiskNameContextE

func GetVirtualMachineOSDiskNameContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) (string, error)

GetVirtualMachineOSDiskNameContextE gets the OS Disk name of the specified Azure Virtual Machine. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineTagsContext

func GetVirtualMachineTagsContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) map[string]string

GetVirtualMachineTagsContext gets the Tags of the specified Virtual Machine as a map. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineTagsContextE

func GetVirtualMachineTagsContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) (map[string]string, error)

GetVirtualMachineTagsContextE gets the Tags of the specified Virtual Machine as a map. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineWithClient

func GetVirtualMachineWithClient(ctx context.Context, client *armcompute.VirtualMachinesClient, resGroupName string, vmName string) (*armcompute.VirtualMachine, error)

GetVirtualMachineWithClient gets a Virtual Machine using the provided client. This variant is useful for testing with fake clients.

func GetVirtualMachinesForResourceGroupContext

func GetVirtualMachinesForResourceGroupContext(t testing.TestingT, ctx context.Context, resGroupName string, subscriptionID string) map[string]armcompute.VirtualMachineProperties

GetVirtualMachinesForResourceGroupContext gets all Virtual Machine objects in the specified Resource Group. Each VM Object represents the entire set of VM compute properties accessible by using the VM name as the map key. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachinesForResourceGroupContextE

func GetVirtualMachinesForResourceGroupContextE(ctx context.Context, resourceGroupName string, subscriptionID string) (map[string]armcompute.VirtualMachineProperties, error)

GetVirtualMachinesForResourceGroupContextE gets all Virtual Machine objects in the specified Resource Group. Each VM Object represents the entire set of VM compute properties accessible by using the VM name as the map key. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachinesForResourceGroupWithClient

func GetVirtualMachinesForResourceGroupWithClient(ctx context.Context, client *armcompute.VirtualMachinesClient, resourceGroupName string) (map[string]armcompute.VirtualMachineProperties, error)

GetVirtualMachinesForResourceGroupWithClient gets all Virtual Machine objects in the specified Resource Group using the provided client. Each VM Object represents the entire set of VM compute properties accessible by using the VM name as the map key. This variant is useful for testing with fake clients.

func GetVirtualNetworkContextE

func GetVirtualNetworkContextE(ctx context.Context, vnetName string, resGroupName string, subscriptionID string) (*armnetwork.VirtualNetwork, error)

GetVirtualNetworkContextE gets Virtual Network in the specified Azure Resource Group. The ctx parameter supports cancellation and timeouts.

func GetVirtualNetworkDNSServerIPsContext

func GetVirtualNetworkDNSServerIPsContext(t testing.TestingT, ctx context.Context, vnetName string, resGroupName string, subscriptionID string) []string

GetVirtualNetworkDNSServerIPsContext gets a list of all Virtual Network DNS server IPs. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualNetworkDNSServerIPsContextE

func GetVirtualNetworkDNSServerIPsContextE(ctx context.Context, vnetName string, resGroupName string, subscriptionID string) ([]string, error)

GetVirtualNetworkDNSServerIPsContextE gets a list of all Virtual Network DNS server IPs. The ctx parameter supports cancellation and timeouts.

func GetVirtualNetworkSubnetsContext

func GetVirtualNetworkSubnetsContext(t testing.TestingT, ctx context.Context, vnetName string, resGroupName string, subscriptionID string) map[string]string

GetVirtualNetworkSubnetsContext gets all Subnet names and their respective address prefixes in the specified Virtual Network. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualNetworkSubnetsContextE

func GetVirtualNetworkSubnetsContextE(ctx context.Context, vnetName string, resGroupName string, subscriptionID string) (map[string]string, error)

GetVirtualNetworkSubnetsContextE gets all Subnet names and their respective address prefixes in the specified Virtual Network. Returning both the name and prefix together helps reduce calls for these frequently accessed properties. The ctx parameter supports cancellation and timeouts.

func GetVirtualNetworkSubnetsWithClient

func GetVirtualNetworkSubnetsWithClient(ctx context.Context, client *armnetwork.SubnetsClient, resGroupName string, vnetName string) (map[string]string, error)

GetVirtualNetworkSubnetsWithClient gets all Subnet names and their respective address prefixes using the provided SubnetsClient.

func GetVirtualNetworkWithClient

func GetVirtualNetworkWithClient(ctx context.Context, client *armnetwork.VirtualNetworksClient, resGroupName string, vnetName string) (*armnetwork.VirtualNetwork, error)

GetVirtualNetworkWithClient gets a Virtual Network using the provided VirtualNetworksClient.

func GetVirtualNetworksClientContextE

func GetVirtualNetworksClientContextE(ctx context.Context, subscriptionID string) (*armnetwork.VirtualNetworksClient, error)

GetVirtualNetworksClientContextE creates a virtual network client in the specified Azure Subscription. The ctx parameter supports cancellation and timeouts.

func KeyVaultCertificateExistsContext

func KeyVaultCertificateExistsContext(t testing.TestingT, ctx context.Context, keyVaultName string, certificateName string) bool

KeyVaultCertificateExistsContext indicates whether a key vault certificate exists; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func KeyVaultCertificateExistsContextE

func KeyVaultCertificateExistsContextE(ctx context.Context, keyVaultName, certificateName string) (bool, error)

KeyVaultCertificateExistsContextE indicates whether a certificate exists in key vault; otherwise false. The ctx parameter supports cancellation and timeouts.

func KeyVaultKeyExistsContext

func KeyVaultKeyExistsContext(t testing.TestingT, ctx context.Context, keyVaultName string, keyName string) bool

KeyVaultKeyExistsContext indicates whether a key vault key exists; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func KeyVaultKeyExistsContextE

func KeyVaultKeyExistsContextE(ctx context.Context, keyVaultName, keyName string) (bool, error)

KeyVaultKeyExistsContextE indicates whether a key exists in the key vault; otherwise false. The ctx parameter supports cancellation and timeouts.

func KeyVaultSecretExistsContext

func KeyVaultSecretExistsContext(t testing.TestingT, ctx context.Context, keyVaultName string, secretName string) bool

KeyVaultSecretExistsContext indicates whether a key vault secret exists; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func KeyVaultSecretExistsContextE

func KeyVaultSecretExistsContextE(ctx context.Context, keyVaultName, secretName string) (bool, error)

KeyVaultSecretExistsContextE indicates whether a secret exists in the key vault; otherwise false. The ctx parameter supports cancellation and timeouts.

func ListMySQLDBContext

func ListMySQLDBContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) []*armmysql.Database

ListMySQLDBContext is a helper function that gets all databases per server. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListMySQLDBContextE

func ListMySQLDBContextE(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) ([]*armmysql.Database, error)

ListMySQLDBContextE is a helper function that gets all databases per server. The ctx parameter supports cancellation and timeouts.

func ListMySQLDBWithClient

func ListMySQLDBWithClient(ctx context.Context, client *armmysql.DatabasesClient, resGroupName string, serverName string) ([]*armmysql.Database, error)

ListMySQLDBWithClient lists all databases per server using the provided DatabasesClient.

func ListNamespaceAuthRulesContext

func ListNamespaceAuthRulesContext(t testing.TestingT, ctx context.Context, subscriptionID string, namespace string, resourceGroup string) []string

ListNamespaceAuthRulesContext authenticates the namespace client and enumerates all values to get a list of authorization rules for the given namespace name, automatically crossing page boundaries as required. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListNamespaceAuthRulesContextE

func ListNamespaceAuthRulesContextE(ctx context.Context, subscriptionID string, namespace string, resourceGroup string) ([]string, error)

ListNamespaceAuthRulesContextE authenticates the namespace client and enumerates all values to get a list of authorization rules for the given namespace name, automatically crossing page boundaries as required. The ctx parameter supports cancellation and timeouts.

func ListNamespaceTopicsContext

func ListNamespaceTopicsContext(t testing.TestingT, ctx context.Context, subscriptionID string, namespace string, resourceGroup string) []*armservicebus.SBTopic

ListNamespaceTopicsContext authenticates the topic client and enumerates all values, automatically crossing page boundaries as required. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListNamespaceTopicsContextE

func ListNamespaceTopicsContextE(ctx context.Context, subscriptionID string, namespace string, resourceGroup string) ([]*armservicebus.SBTopic, error)

ListNamespaceTopicsContextE authenticates the topic client and enumerates all values, automatically crossing page boundaries as required. The ctx parameter supports cancellation and timeouts.

func ListPostgreSQLDBContext

func ListPostgreSQLDBContext(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) []*armpostgresql.Database

ListPostgreSQLDBContext is a helper function that gets all databases per server. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListPostgreSQLDBContextE

func ListPostgreSQLDBContextE(t testing.TestingT, ctx context.Context, subscriptionID string, resGroupName string, serverName string) ([]*armpostgresql.Database, error)

ListPostgreSQLDBContextE is a helper function that gets all databases per server. The ctx parameter supports cancellation and timeouts.

func ListPostgreSQLDBWithClient

func ListPostgreSQLDBWithClient(ctx context.Context, client *armpostgresql.DatabasesClient, resGroupName string, serverName string) ([]*armpostgresql.Database, error)

ListPostgreSQLDBWithClient lists all databases per server using the provided DatabasesClient.

func ListResourceGroupsByTagContext

func ListResourceGroupsByTagContext(t testing.TestingT, ctx context.Context, tag, subscriptionID string) []*armresources.ResourceGroup

ListResourceGroupsByTagContext returns a resource group list within a subscription based on a tag key. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListResourceGroupsByTagContextE

func ListResourceGroupsByTagContextE(ctx context.Context, tag string, subscriptionID string) ([]*armresources.ResourceGroup, error)

ListResourceGroupsByTagContextE returns a resource group list within a subscription based on a tag key. The ctx parameter supports cancellation and timeouts.

func ListResourceGroupsByTagWithClient

func ListResourceGroupsByTagWithClient(ctx context.Context, client *armresources.ResourceGroupsClient, tag string) ([]*armresources.ResourceGroup, error)

ListResourceGroupsByTagWithClient returns resource groups matching a tag key using the provided client.

func ListSQLServerDatabasesContext

func ListSQLServerDatabasesContext(t testing.TestingT, ctx context.Context, resGroupName string, serverName string, subscriptionID string) []*armsql.Database

ListSQLServerDatabasesContext is a helper function that gets a list of databases on a sql server. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListSQLServerDatabasesContextE

func ListSQLServerDatabasesContextE(t testing.TestingT, ctx context.Context, resGroupName string, serverName string, subscriptionID string) ([]*armsql.Database, error)

ListSQLServerDatabasesContextE is a helper function that gets a list of databases on a sql server. The ctx parameter supports cancellation and timeouts.

func ListSQLServerDatabasesWithClient

func ListSQLServerDatabasesWithClient(ctx context.Context, client *armsql.DatabasesClient, resGroupName string, serverName string) ([]*armsql.Database, error)

ListSQLServerDatabasesWithClient lists databases on a sql server using the provided DatabasesClient.

func ListServiceBusNamespaceByResourceGroupContext

func ListServiceBusNamespaceByResourceGroupContext(t testing.TestingT, ctx context.Context, subscriptionID string, resourceGroup string) []*armservicebus.SBNamespace

ListServiceBusNamespaceByResourceGroupContext lists all SB namespaces in the given resource group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceByResourceGroupContextE

func ListServiceBusNamespaceByResourceGroupContextE(ctx context.Context, subscriptionID string, resourceGroup string) ([]*armservicebus.SBNamespace, error)

ListServiceBusNamespaceByResourceGroupContextE lists all SB namespaces in the given resource group. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceContext

func ListServiceBusNamespaceContext(t testing.TestingT, ctx context.Context, subscriptionID string) []*armservicebus.SBNamespace

ListServiceBusNamespaceContext lists all SB namespaces in all resource groups in the given subscription ID. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceContextE

func ListServiceBusNamespaceContextE(ctx context.Context, subscriptionID string) ([]*armservicebus.SBNamespace, error)

ListServiceBusNamespaceContextE lists all SB namespaces in all resource groups in the given subscription ID. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceIDsByResourceGroupContext

func ListServiceBusNamespaceIDsByResourceGroupContext(t testing.TestingT, ctx context.Context, subscriptionID string, resourceGroup string) []string

ListServiceBusNamespaceIDsByResourceGroupContext lists IDs of all SB namespaces in the given resource group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceIDsByResourceGroupContextE

func ListServiceBusNamespaceIDsByResourceGroupContextE(ctx context.Context, subscriptionID string, resourceGroup string) ([]string, error)

ListServiceBusNamespaceIDsByResourceGroupContextE lists IDs of all SB namespaces in the given resource group. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceIDsContext

func ListServiceBusNamespaceIDsContext(t testing.TestingT, ctx context.Context, subscriptionID string) []string

ListServiceBusNamespaceIDsContext lists IDs of all SB namespaces in all resource groups in the given subscription ID. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceIDsContextE

func ListServiceBusNamespaceIDsContextE(ctx context.Context, subscriptionID string) ([]string, error)

ListServiceBusNamespaceIDsContextE lists IDs of all SB namespaces in all resource groups in the given subscription ID. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceNamesByResourceGroupContext

func ListServiceBusNamespaceNamesByResourceGroupContext(t testing.TestingT, ctx context.Context, subscriptionID string, resourceGroup string) []string

ListServiceBusNamespaceNamesByResourceGroupContext lists names of all SB namespaces in the given resource group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceNamesByResourceGroupContextE

func ListServiceBusNamespaceNamesByResourceGroupContextE(ctx context.Context, subscriptionID string, resourceGroup string) ([]string, error)

ListServiceBusNamespaceNamesByResourceGroupContextE lists names of all SB namespaces in the given resource group. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceNamesContext

func ListServiceBusNamespaceNamesContext(t testing.TestingT, ctx context.Context, subscriptionID string) []string

ListServiceBusNamespaceNamesContext lists names of all SB namespaces in all resource groups in the given subscription ID. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceNamesContextE

func ListServiceBusNamespaceNamesContextE(ctx context.Context, subscriptionID string) ([]string, error)

ListServiceBusNamespaceNamesContextE lists names of all SB namespaces in all resource groups in the given subscription ID. The ctx parameter supports cancellation and timeouts.

func ListServiceBusNamespaceWithClient

func ListServiceBusNamespaceWithClient(ctx context.Context, client *armservicebus.NamespacesClient) ([]*armservicebus.SBNamespace, error)

ListServiceBusNamespaceWithClient lists all SB namespaces using the provided NamespacesClient.

func ListTopicAuthRulesContext

func ListTopicAuthRulesContext(t testing.TestingT, ctx context.Context, subscriptionID string, namespace string, resourceGroup string, topicName string) []string

ListTopicAuthRulesContext authenticates the topic client and enumerates all values to get a list of authorization rules for the given topic name, automatically crossing page boundaries as required. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListTopicAuthRulesContextE

func ListTopicAuthRulesContextE(ctx context.Context, subscriptionID string, namespace string, resourceGroup string, topicName string) ([]string, error)

ListTopicAuthRulesContextE authenticates the topic client and enumerates all values to get a list of authorization rules for the given topic name, automatically crossing page boundaries as required. The ctx parameter supports cancellation and timeouts.

func ListTopicSubscriptionsContext

func ListTopicSubscriptionsContext(t testing.TestingT, ctx context.Context, subscriptionID string, namespace string, resourceGroup string, topicName string) []*armservicebus.SBSubscription

ListTopicSubscriptionsContext authenticates the subscriptions client and enumerates all values, automatically crossing page boundaries as required. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListTopicSubscriptionsContextE

func ListTopicSubscriptionsContextE(ctx context.Context, subscriptionID string, namespace string, resourceGroup string, topicName string) ([]*armservicebus.SBSubscription, error)

ListTopicSubscriptionsContextE authenticates the subscriptions client and enumerates all values, automatically crossing page boundaries as required. The ctx parameter supports cancellation and timeouts.

func ListTopicSubscriptionsNameContext

func ListTopicSubscriptionsNameContext(t testing.TestingT, ctx context.Context, subscriptionID string, namespace string, resourceGroup string, topicName string) []string

ListTopicSubscriptionsNameContext authenticates the subscriptions client and enumerates all values to get a list of subscriptions for the given topic name, automatically crossing page boundaries as required. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListTopicSubscriptionsNameContextE

func ListTopicSubscriptionsNameContextE(ctx context.Context, subscriptionID string, namespace string, resourceGroup string, topicName string) ([]string, error)

ListTopicSubscriptionsNameContextE authenticates the subscriptions client and enumerates all values to get a list of subscriptions for the given topic name, automatically crossing page boundaries as required. The ctx parameter supports cancellation and timeouts.

func ListVirtualMachinesForResourceGroupContext

func ListVirtualMachinesForResourceGroupContext(t testing.TestingT, ctx context.Context, resGroupName string, subscriptionID string) []string

ListVirtualMachinesForResourceGroupContext gets a list of all Virtual Machine names in the specified Resource Group. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ListVirtualMachinesForResourceGroupContextE

func ListVirtualMachinesForResourceGroupContextE(ctx context.Context, resourceGroupName string, subscriptionID string) ([]string, error)

ListVirtualMachinesForResourceGroupContextE gets a list of all Virtual Machine names in the specified Resource Group. The ctx parameter supports cancellation and timeouts.

func ListVirtualMachinesForResourceGroupWithClient

func ListVirtualMachinesForResourceGroupWithClient(ctx context.Context, client *armcompute.VirtualMachinesClient, resourceGroupName string) ([]string, error)

ListVirtualMachinesForResourceGroupWithClient gets a list of all Virtual Machine names in the specified Resource Group using the provided client. This variant is useful for testing with fake clients.

func LoadBalancerExistsContext

func LoadBalancerExistsContext(t testing.TestingT, ctx context.Context, loadBalancerName string, resourceGroupName string, subscriptionID string) bool

LoadBalancerExistsContext indicates whether the specified Load Balancer exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func LoadBalancerExistsContextE

func LoadBalancerExistsContextE(ctx context.Context, loadBalancerName string, resourceGroupName string, subscriptionID string) (bool, error)

LoadBalancerExistsContextE indicates whether the specified Load Balancer exists. The ctx parameter supports cancellation and timeouts.

func LogAnalyticsWorkspaceExistsContext

func LogAnalyticsWorkspaceExistsContext(t testing.TestingT, ctx context.Context, workspaceName string, resourceGroupName string, subscriptionID string) bool

LogAnalyticsWorkspaceExistsContext indicates whether the operational insights workspace exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func LogAnalyticsWorkspaceExistsContextE

func LogAnalyticsWorkspaceExistsContextE(ctx context.Context, workspaceName string, resourceGroupName string, subscriptionID string) (bool, error)

LogAnalyticsWorkspaceExistsContextE indicates whether the operational insights workspace exists and may return an error. The ctx parameter supports cancellation and timeouts.

func ManagedEnvironmentExistsContext

func ManagedEnvironmentExistsContext(t testing.TestingT, ctx context.Context, environmentName string, resourceGroupName string, subscriptionID string) bool

ManagedEnvironmentExistsContext indicates whether the specified Managed Environment exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ManagedEnvironmentExistsContextE

func ManagedEnvironmentExistsContextE(ctx context.Context, environmentName string, resourceGroupName string, subscriptionID string) (bool, error)

ManagedEnvironmentExistsContextE indicates whether the specified Managed Environment exists. The ctx parameter supports cancellation and timeouts.

func NetworkInterfaceExistsContext

func NetworkInterfaceExistsContext(t testing.TestingT, ctx context.Context, nicName string, resGroupName string, subscriptionID string) bool

NetworkInterfaceExistsContext indicates whether the specified Azure Network Interface exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func NetworkInterfaceExistsContextE

func NetworkInterfaceExistsContextE(ctx context.Context, nicName string, resGroupName string, subscriptionID string) (bool, error)

NetworkInterfaceExistsContextE indicates whether the specified Azure Network Interface exists. The ctx parameter supports cancellation and timeouts.

func NewAzureCredentialE

func NewAzureCredentialE() (*azidentity.DefaultAzureCredential, error)

NewAzureCredentialE creates a new Azure credential using DefaultAzureCredential.

func PrivateDNSZoneExistsContextE

func PrivateDNSZoneExistsContextE(ctx context.Context, zoneName string, resourceGroupName string, subscriptionID string) (bool, error)

PrivateDNSZoneExistsContextE indicates whether the specified private DNS zone exists. The ctx parameter supports cancellation and timeouts.

func PublicAddressExistsContext

func PublicAddressExistsContext(t testing.TestingT, ctx context.Context, publicAddressName string, resGroupName string, subscriptionID string) bool

PublicAddressExistsContext indicates whether the specified Azure Public Address exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func PublicAddressExistsContextE

func PublicAddressExistsContextE(ctx context.Context, publicAddressName string, resGroupName string, subscriptionID string) (bool, error)

PublicAddressExistsContextE indicates whether the specified Azure Public Address exists. The ctx parameter supports cancellation and timeouts.

func RecoveryServicesVaultExistsContext

func RecoveryServicesVaultExistsContext(t testing.TestingT, ctx context.Context, vaultName, resourceGroupName, subscriptionID string) bool

RecoveryServicesVaultExistsContext indicates whether a recovery services vault exists; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func RecoveryServicesVaultExistsContextE

func RecoveryServicesVaultExistsContextE(ctx context.Context, vaultName, resourceGroupName, subscriptionID string) (bool, error)

RecoveryServicesVaultExistsContextE indicates whether a recovery services vault exists; otherwise false or error. The ctx parameter supports cancellation and timeouts.

func ResourceGroupExistsContext

func ResourceGroupExistsContext(t testing.TestingT, ctx context.Context, resourceGroupName string, subscriptionID string) bool

ResourceGroupExistsContext indicates whether a resource group exists within a subscription; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func ResourceGroupExistsContextE

func ResourceGroupExistsContextE(ctx context.Context, resourceGroupName, subscriptionID string) (bool, error)

ResourceGroupExistsContextE indicates whether a resource group exists within a subscription. The ctx parameter supports cancellation and timeouts.

func ResourceNotFoundErrorExists

func ResourceNotFoundErrorExists(err error) bool

ResourceNotFoundErrorExists checks the Service Error Code for the 'Resource Not Found' error.

func SQLManagedInstanceExistsContext

func SQLManagedInstanceExistsContext(t testing.TestingT, ctx context.Context, managedInstanceName string, resourceGroupName string, subscriptionID string) bool

SQLManagedInstanceExistsContext indicates whether the SQL Managed Instance exists for the subscription. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func SQLManagedInstanceExistsContextE

func SQLManagedInstanceExistsContextE(ctx context.Context, managedInstanceName string, resourceGroupName string, subscriptionID string) (bool, error)

SQLManagedInstanceExistsContextE indicates whether the specified SQL Managed Instance exists. The ctx parameter supports cancellation and timeouts.

func StorageAccountExistsContext

func StorageAccountExistsContext(t testing.TestingT, ctx context.Context, storageAccountName string, resourceGroupName string, subscriptionID string) bool

StorageAccountExistsContext indicates whether the storage account name exactly matches; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func StorageAccountExistsContextE

func StorageAccountExistsContextE(ctx context.Context, storageAccountName, resourceGroupName, subscriptionID string) (bool, error)

StorageAccountExistsContextE indicates whether the storage account name exists; otherwise false. The ctx parameter supports cancellation and timeouts.

func StorageBlobContainerExistsContext

func StorageBlobContainerExistsContext(t testing.TestingT, ctx context.Context, containerName string, storageAccountName string, resourceGroupName string, subscriptionID string) bool

StorageBlobContainerExistsContext returns true if the container name exactly matches; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func StorageBlobContainerExistsContextE

func StorageBlobContainerExistsContextE(ctx context.Context, containerName, storageAccountName, resourceGroupName, subscriptionID string) (bool, error)

StorageBlobContainerExistsContextE returns true if the container name exists; otherwise false. The ctx parameter supports cancellation and timeouts.

func StorageFileShareExistsContext

func StorageFileShareExistsContext(t testing.TestingT, ctx context.Context, fileShareName string, storageAccountName string, resourceGroupName string, subscriptionID string) bool

StorageFileShareExistsContext returns true if the file share name exactly matches; otherwise false. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func StorageFileShareExistsContextE

func StorageFileShareExistsContextE(ctx context.Context, fileShareName string, storageAccountName string, resourceGroupName string, subscriptionID string) (bool, error)

StorageFileShareExistsContextE returns true if the file share name exactly matches; otherwise false. The ctx parameter supports cancellation and timeouts.

func SubnetExistsContext

func SubnetExistsContext(t testing.TestingT, ctx context.Context, subnetName string, vnetName string, resGroupName string, subscriptionID string) bool

SubnetExistsContext indicates whether the specified Azure Virtual Network Subnet exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func SubnetExistsContextE

func SubnetExistsContextE(ctx context.Context, subnetName string, vnetName string, resGroupName string, subscriptionID string) (bool, error)

SubnetExistsContextE indicates whether the specified Azure Virtual Network Subnet exists. The ctx parameter supports cancellation and timeouts.

func VirtualMachineExistsContext

func VirtualMachineExistsContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) bool

VirtualMachineExistsContext indicates whether the specified Azure Virtual Machine exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func VirtualMachineExistsContextE

func VirtualMachineExistsContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) (bool, error)

VirtualMachineExistsContextE indicates whether the specified Azure Virtual Machine exists. The ctx parameter supports cancellation and timeouts.

func VirtualNetworkExistsContext

func VirtualNetworkExistsContext(t testing.TestingT, ctx context.Context, vnetName string, resGroupName string, subscriptionID string) bool

VirtualNetworkExistsContext indicates whether the specified Azure Virtual Network exists. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func VirtualNetworkExistsContextE

func VirtualNetworkExistsContextE(ctx context.Context, vnetName string, resGroupName string, subscriptionID string) (bool, error)

VirtualNetworkExistsContextE indicates whether the specified Azure Virtual Network exists. The ctx parameter supports cancellation and timeouts.

Types

type FailedToParseError

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

FailedToParseError is returned when an object cannot be parsed.

func NewFailedToParseError

func NewFailedToParseError(objectType string, objectID string) FailedToParseError

NewFailedToParseError creates a new not found error when an expected object is not found in the search space.

func (FailedToParseError) Error

func (err FailedToParseError) Error() string

type Instance

type Instance struct {
	*armcompute.VirtualMachine
}

Instance of the VM

func (*Instance) GetVirtualMachineInstanceSize

func (vm *Instance) GetVirtualMachineInstanceSize() armcompute.VirtualMachineSizeTypes

GetVirtualMachineInstanceSize gets the size of the Virtual Machine.

type LoadBalancerIPType

type LoadBalancerIPType string

LoadBalancerIPType enumerator for types Public, Private or No IP.

const (
	PublicIP  LoadBalancerIPType = "PublicIP"
	PrivateIP LoadBalancerIPType = "PrivateIP"
	NoIP      LoadBalancerIPType = "NoIP"
)

LoadBalancerIPType values

func GetIPOfLoadBalancerFrontendIPConfigContext

func GetIPOfLoadBalancerFrontendIPConfigContext(t testing.TestingT, ctx context.Context, feConfigName string, loadBalancerName string, resourceGroupName string, subscriptionID string) (ipAddress string, publicOrPrivate LoadBalancerIPType)

GetIPOfLoadBalancerFrontendIPConfigContext gets the IP and LoadBalancerIPType for the specified Load Balancer Frontend IP Configuration. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetIPOfLoadBalancerFrontendIPConfigContextE

func GetIPOfLoadBalancerFrontendIPConfigContextE(ctx context.Context, feConfigName string, loadBalancerName string, resourceGroupName string, subscriptionID string) (ipAddress string, publicOrPrivate LoadBalancerIPType, err1 error)

GetIPOfLoadBalancerFrontendIPConfigContextE gets the IP and LoadBalancerIPType for the specified Load Balancer Frontend IP Configuration. The ctx parameter supports cancellation and timeouts.

func GetIPOfLoadBalancerFrontendIPConfigWithClient

func GetIPOfLoadBalancerFrontendIPConfigWithClient(ctx context.Context, feConfig *armnetwork.FrontendIPConfiguration, pipClient *armnetwork.PublicIPAddressesClient, resourceGroupName string) (string, LoadBalancerIPType, error)

GetIPOfLoadBalancerFrontendIPConfigWithClient gets the IP and LoadBalancerIPType for the specified Frontend IP Configuration. For public IPs it requires a PublicIPAddressesClient to resolve the public IP address.

type NotFoundError

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

NotFoundError is returned when an expected object is not found in the search space.

func NewNotFoundError

func NewNotFoundError(objectType string, objectID string, region string) NotFoundError

NewNotFoundError creates a new not found error when an expected object is not found in the search space.

func (NotFoundError) Error

func (err NotFoundError) Error() string

type NsgRuleSummary

type NsgRuleSummary struct {
	SourceAddressPrefix        string
	Direction                  string
	SourcePortRange            string
	Access                     string
	Name                       string
	Description                string
	DestinationPortRange       string
	Protocol                   string
	DestinationAddressPrefix   string
	SourcePortRanges           []string
	DestinationPortRanges      []string
	DestinationAddressPrefixes []string
	SourceAddressPrefixes      []string
	Priority                   int32
}

NsgRuleSummary is a string-based (non-pointer) summary of an NSG rule with several helper methods attached to help with verification of rule configuration.

func GetCustomNSGRulesWithClient

func GetCustomNSGRulesWithClient(ctx context.Context, client *armnetwork.SecurityRulesClient, resourceGroupName, nsgName string) ([]NsgRuleSummary, error)

GetCustomNSGRulesWithClient returns custom (user-defined) NSG rules using the provided SecurityRulesClient.

func GetDefaultNSGRulesWithClient

func GetDefaultNSGRulesWithClient(ctx context.Context, client *armnetwork.DefaultSecurityRulesClient, resourceGroupName, nsgName string) ([]NsgRuleSummary, error)

GetDefaultNSGRulesWithClient returns default (platform) NSG rules using the provided DefaultSecurityRulesClient.

func (*NsgRuleSummary) AllowsDestinationPort

func (summarizedRule *NsgRuleSummary) AllowsDestinationPort(t testing.TestingT, port string) bool

AllowsDestinationPort checks to see if the rule allows a specific destination port. This is helpful when verifying that a given rule is configured properly for a given port.

func (*NsgRuleSummary) AllowsSourcePort

func (summarizedRule *NsgRuleSummary) AllowsSourcePort(t testing.TestingT, port string) bool

AllowsSourcePort checks to see if the rule allows a specific source port. This is helpful when verifying that a given rule is configured properly for a given port.

type NsgRuleSummaryList

type NsgRuleSummaryList struct {
	SummarizedRules []NsgRuleSummary
}

NsgRuleSummaryList holds a collection of NsgRuleSummary rules.

func GetAllNSGRulesContext

func GetAllNSGRulesContext(t testing.TestingT, ctx context.Context, resourceGroupName, nsgName, subscriptionID string) NsgRuleSummaryList

GetAllNSGRulesContext returns an NsgRuleSummaryList instance containing the combined "default" and "custom" rules from a network security group. The ctx parameter supports cancellation and timeouts. This function would fail the test if there is an error.

func GetAllNSGRulesContextE

func GetAllNSGRulesContextE(ctx context.Context, resourceGroupName, nsgName, subscriptionID string) (NsgRuleSummaryList, error)

GetAllNSGRulesContextE returns an NsgRuleSummaryList instance containing the combined "default" and "custom" rules from a network security group. The ctx parameter supports cancellation and timeouts.

func (*NsgRuleSummaryList) FindRuleByName

func (summarizedRules *NsgRuleSummaryList) FindRuleByName(name string) NsgRuleSummary

FindRuleByName looks for a matching rule by name within the current collection of rules.

type ResourceGroupNameNotFound

type ResourceGroupNameNotFound struct{}

ResourceGroupNameNotFound is an error that occurs when the target Azure Resource Group name could not be found or was not provided.

func (ResourceGroupNameNotFound) Error

func (err ResourceGroupNameNotFound) Error() string

type ResourceIDNameNotFoundError

type ResourceIDNameNotFoundError struct {
	ResourceID string
}

ResourceIDNameNotFoundError is returned when a name cannot be resolved from an Azure resource ID. The offending ID is exported so callers can inspect it via errors.As.

func NewResourceIDNameNotFoundError

func NewResourceIDNameNotFoundError(resourceID string) ResourceIDNameNotFoundError

NewResourceIDNameNotFoundError creates a ResourceIDNameNotFoundError for the given resource ID.

func (ResourceIDNameNotFoundError) Error

func (err ResourceIDNameNotFoundError) Error() string

type SubscriptionIDNotFound

type SubscriptionIDNotFound struct{}

SubscriptionIDNotFound is an error that occurs when the Azure Subscription ID could not be found or was not provided.

func (SubscriptionIDNotFound) Error

func (err SubscriptionIDNotFound) Error() string

type UnknownEnvironmentError

type UnknownEnvironmentError struct {
	EnvironmentName string
}

UnknownEnvironmentError is returned when an Azure environment name is not recognized.

func (*UnknownEnvironmentError) Error

func (e *UnknownEnvironmentError) Error() string

type VMImage

type VMImage struct {
	Publisher string
	Offer     string
	SKU       string
	Version   string
}

VMImage represents the storage image for the specified Azure Virtual Machine.

func GetVirtualMachineImageContext

func GetVirtualMachineImageContext(t testing.TestingT, ctx context.Context, vmName string, resGroupName string, subscriptionID string) *VMImage

GetVirtualMachineImageContext gets the Image of the specified Azure Virtual Machine. This function would fail the test if there is an error. The ctx parameter supports cancellation and timeouts.

func GetVirtualMachineImageContextE

func GetVirtualMachineImageContextE(ctx context.Context, vmName string, resGroupName string, subscriptionID string) (*VMImage, error)

GetVirtualMachineImageContextE gets the Image of the specified Azure Virtual Machine. The ctx parameter supports cancellation and timeouts.

Jump to

Keyboard shortcuts

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