azure

package
v0.32.12 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 34 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// AuthFromEnvClient is an env variable supported by the Azure SDK
	AuthFromEnvClient = "AZURE_CLIENT_ID"

	// AuthFromEnvTenant is an env variable supported by the Azure SDK
	AuthFromEnvTenant = "AZURE_TENANT_ID"

	// AuthFromFile is an env variable supported by the Azure SDK
	AuthFromFile = "AZURE_AUTH_LOCATION"
)
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"

	// ResourceManagerEndpointName is the name of the ResourceManagerEndpoint field in the Environment struct.
	ResourceManagerEndpointName = "ResourceManagerEndpoint"
)
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"
)

Variables

This section is empty.

Functions

func AvailabilitySetExists added in v0.30.3

func AvailabilitySetExists(t testing.TestingT, avsName string, resGroupName string, subscriptionID string) bool

AvailabilitySetExists indicates whether the specified Azure Availability Set exists. This function would fail the test if there is an error.

func AvailabilitySetExistsE added in v0.30.3

func AvailabilitySetExistsE(t testing.TestingT, avsName string, resGroupName string, subscriptionID string) (bool, error)

AvailabilitySetExistsE indicates whether the specified Azure Availability Set exists

func CheckAvailabilitySetContainsVM added in v0.30.3

func CheckAvailabilitySetContainsVM(t testing.TestingT, vmName string, avsName string, resGroupName string, subscriptionID string) bool

CheckAvailabilitySetContainsVM checks if the Virtual Machine is contained in the Availability Set VMs. This function would fail the test if there is an error.

func CheckAvailabilitySetContainsVME added in v0.30.3

func CheckAvailabilitySetContainsVME(t testing.TestingT, vmName string, avsName string, resGroupName string, subscriptionID string) (bool, error)

CheckAvailabilitySetContainsVME checks if the Virtual Machine is contained in the Availability Set VMs

func CheckPublicDNSNameAvailability added in v0.30.6

func CheckPublicDNSNameAvailability(t testing.TestingT, location string, domainNameLabel string, subscriptionID string) bool

CheckPublicDNSNameAvailability 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.

func CheckPublicDNSNameAvailabilityE added in v0.30.6

func CheckPublicDNSNameAvailabilityE(location string, domainNameLabel string, subscriptionID string) (bool, error)

CheckPublicDNSNameAvailabilityE checks whether a Domain Name in the cloudapp.azure.com zone is available for use.

func CheckSubnetContainsIP added in v0.30.6

func CheckSubnetContainsIP(t testing.TestingT, IP string, subnetName string, vnetName string, resGroupName string, subscriptionID string) bool

CheckSubnetContainsIP checks if the Private IP is contined in the Subnet Address Range. This function would fail the test if there is an error.

func CheckSubnetContainsIPE added in v0.30.6

func CheckSubnetContainsIPE(ipAddress string, subnetName string, vnetName string, resGroupName string, subscriptionID string) (bool, error)

CheckSubnetContainsIPE checks if the Private IP is contined in the Subnet Address Range.

func CreateCosmosDBAccountClientE added in v0.31.3

func CreateCosmosDBAccountClientE(subscriptionID string) (*documentdb.DatabaseAccountsClient, error)

CreateCosmosDBAccountClientE is a helper function that will setup a CosmosDB account client with the correct BaseURI depending on the Azure environment that is currently setup (or "Public", if none is setup).

func CreateCosmosDBSQLClientE added in v0.31.3

func CreateCosmosDBSQLClientE(subscriptionID string) (*documentdb.SQLResourcesClient, error)

CreateCosmosDBSQLClientE is a helper function that will setup a CosmosDB SQL client with the correct BaseURI depending on the Azure environment that is currently setup (or "Public", if none is setup).

func CreateKeyVaultManagementClientE added in v0.31.5

func CreateKeyVaultManagementClientE(subscriptionID string) (*kvmng.VaultsClient, error)

CreateKeyVaultManagementClientE is a helper function that will setup a key vault management client with the correct BaseURI depending on the Azure environment that is currently setup (or "Public", if none is setup).

func CreateManagedClustersClientE added in v0.31.1

func CreateManagedClustersClientE(subscriptionID string) (containerservice.ManagedClustersClient, error)

CreateManagedClustersClientE returns a virtual machines client instance configured with the correct BaseURI depending on the Azure environment that is currently setup (or "Public", if none is setup).

func CreateSubscriptionsClientE added in v0.31.1

func CreateSubscriptionsClientE() (subscriptions.Client, error)

CreateSubscriptionsClientE returns a virtual machines client instance configured with the correct BaseURI depending on the Azure environment that is currently setup (or "Public", if none is setup).

func CreateVirtualMachinesClientE added in v0.31.1

func CreateVirtualMachinesClientE(subscriptionID string) (compute.VirtualMachinesClient, error)

CreateVirtualMachinesClientE returns a virtual machines client instance configured with the correct BaseURI depending on the Azure environment that is currently setup (or "Public", if none is setup).

func DiagnosticSettingsResourceExists added in v0.30.26

func DiagnosticSettingsResourceExists(t testing.TestingT, diagnosticSettingsResourceName string, resourceURI string, subscriptionID string) bool

DiagnosticSettingsResourceExists indicates whether the diagnostic settings resource exists This function would fail the test if there is an error.

func DiagnosticSettingsResourceExistsE added in v0.30.26

func DiagnosticSettingsResourceExistsE(diagnosticSettingsResourceName string, resourceURI string, subscriptionID string) (bool, error)

DiagnosticSettingsResourceExistsE indicates whether the diagnostic settings resource exists

func DiskExists added in v0.30.12

func DiskExists(t testing.TestingT, diskName string, resGroupName string, subscriptionID string) bool

DiskExists indicates whether the specified Azure Managed Disk exists This function would fail the test if there is an error.

func DiskExistsE added in v0.30.12

func DiskExistsE(diskName string, resGroupName string, subscriptionID string) (bool, error)

DiskExistsE indicates whether the specified Azure Managed Disk exists in the specified Azure Resource Group

func GetActionGroupResource added in v0.30.2

func GetActionGroupResource(t *testing.T, ruleName string, resGroupName string, subscriptionID string) *insights.ActionGroupResource

GetActionGroupResource gets the ActionGroupResource. 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 GetActionGroupResourceE added in v0.30.2

func GetActionGroupResourceE(ruleName string, resGroupName string, subscriptionID string) (*insights.ActionGroupResource, error)

GetActionGroupResourceE gets the ActionGroupResource with Error details on error. 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 GetActivityLogAlertResource added in v0.30.26

func GetActivityLogAlertResource(t testing.TestingT, activityLogAlertName string, resGroupName string, subscriptionID string) *insights.ActivityLogAlertResource

GetActivityLogAlertResource gets a Action Group in the specified Azure Resource Group This function would fail the test if there is an error.

func GetActivityLogAlertResourceE added in v0.30.26

func GetActivityLogAlertResourceE(activityLogAlertName string, resGroupName string, subscriptionID string) (*insights.ActivityLogAlertResource, error)

GetActivityLogAlertResourceE gets a Action Group in the specified Azure Resource Group

func GetActivityLogAlertsClientE added in v0.30.26

func GetActivityLogAlertsClientE(subscriptionID string) (*insights.ActivityLogAlertsClient, error)

GetActivityLogAlertsClientE gets an Action Groups client in the specified Azure Subscription

func GetAllAzureRegions

func GetAllAzureRegions(t testing.TestingT, subscriptionID string) []string

GetAllAzureRegions gets the list of Azure regions available in this subscription.

func GetAllAzureRegionsE

func GetAllAzureRegionsE(t testing.TestingT, subscriptionID string) ([]string, error)

GetAllAzureRegionsE gets the list of Azure regions available in this subscription

func GetAvailabilitySetClientE added in v0.30.3

func GetAvailabilitySetClientE(subscriptionID string) (*compute.AvailabilitySetsClient, error)

GetAvailabilitySetClientE gets a new Availability Set client in the specified Azure Subscription

func GetAvailabilitySetE added in v0.30.3

func GetAvailabilitySetE(t testing.TestingT, avsName string, resGroupName string, subscriptionID string) (*compute.AvailabilitySet, error)

GetAvailabilitySetE gets an Availability Set in the specified Azure Resource Group

func GetAvailabilitySetFaultDomainCount added in v0.30.3

func GetAvailabilitySetFaultDomainCount(t testing.TestingT, avsName string, resGroupName string, subscriptionID string) int32

GetAvailabilitySetFaultDomainCount gets the Fault Domain Count for the specified Azure Availability Set. This function would fail the test if there is an error.

func GetAvailabilitySetFaultDomainCountE added in v0.30.3

func GetAvailabilitySetFaultDomainCountE(t testing.TestingT, avsName string, resGroupName string, subscriptionID string) (int32, error)

GetAvailabilitySetFaultDomainCountE gets the Fault Domain Count for the specified Azure Availability Set

func GetAvailabilitySetVMNamesInCaps added in v0.30.3

func GetAvailabilitySetVMNamesInCaps(t testing.TestingT, avsName string, resGroupName string, subscriptionID string) []string

GetAvailabilitySetVMNamesInCaps gets a list of VM names in the specified Azure Availability Set. This function would fail the test if there is an error.

func GetAvailabilitySetVMNamesInCapsE added in v0.30.3

func GetAvailabilitySetVMNamesInCapsE(t testing.TestingT, avsName string, resGroupName string, subscriptionID string) ([]string, error)

GetAvailabilitySetVMNamesInCapsE gets a list of VM names in the specified Azure Availability Set

func GetCosmosDBAccount added in v0.31.3

func GetCosmosDBAccount(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string) *documentdb.DatabaseAccountGetResults

GetCosmosDBAccount is a helper function that gets the database account. This function would fail the test if there is an error.

func GetCosmosDBAccountClient added in v0.31.3

func GetCosmosDBAccountClient(t testing.TestingT, subscriptionID string) *documentdb.DatabaseAccountsClient

GetCosmosDBAccountClient is a helper function that will setup a CosmosDB account client. This function would fail the test if there is an error.

func GetCosmosDBAccountClientE added in v0.31.3

func GetCosmosDBAccountClientE(subscriptionID string) (*documentdb.DatabaseAccountsClient, error)

GetCosmosDBAccountClientE is a helper function that will setup a CosmosDB account client.

func GetCosmosDBAccountE added in v0.31.3

func GetCosmosDBAccountE(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string) (*documentdb.DatabaseAccountGetResults, error)

GetCosmosDBAccountE is a helper function that gets the database account.

func GetCosmosDBSQLClient added in v0.31.3

func GetCosmosDBSQLClient(t testing.TestingT, subscriptionID string) *documentdb.SQLResourcesClient

GetCosmosDBSQLClient is a helper function that will setup a CosmosDB SQL client. This function would fail the test if there is an error.

func GetCosmosDBSQLClientE added in v0.31.3

func GetCosmosDBSQLClientE(subscriptionID string) (*documentdb.SQLResourcesClient, error)

GetCosmosDBSQLClientE is a helper function that will setup a CosmosDB SQL client.

func GetCosmosDBSQLContainer added in v0.31.3

func GetCosmosDBSQLContainer(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string, databaseName string, containerName string) *documentdb.SQLContainerGetResults

GetCosmosDBSQLContainer is a helper function that gets a SQL container. This function would fail the test if there is an error.

func GetCosmosDBSQLContainerE added in v0.31.3

func GetCosmosDBSQLContainerE(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string, databaseName string, containerName string) (*documentdb.SQLContainerGetResults, error)

GetCosmosDBSQLContainerE is a helper function that gets a SQL container.

func GetCosmosDBSQLContainerThroughput added in v0.31.3

func GetCosmosDBSQLContainerThroughput(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string, databaseName string, containerName string) *documentdb.ThroughputSettingsGetResults

GetCosmosDBSQLContainerThroughput is a helper function that gets a SQL container throughput configuration. This function would fail the test if there is an error.

func GetCosmosDBSQLContainerThroughputE added in v0.31.3

func GetCosmosDBSQLContainerThroughputE(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string, databaseName string, containerName string) (*documentdb.ThroughputSettingsGetResults, error)

GetCosmosDBSQLContainerThroughputE is a helper function that gets a SQL container throughput configuration.

func GetCosmosDBSQLDatabase added in v0.31.3

func GetCosmosDBSQLDatabase(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string, databaseName string) *documentdb.SQLDatabaseGetResults

GetCosmosDBSQLDatabase is a helper function that gets a SQL database. This function would fail the test if there is an error.

func GetCosmosDBSQLDatabaseE added in v0.31.3

func GetCosmosDBSQLDatabaseE(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string, databaseName string) (*documentdb.SQLDatabaseGetResults, error)

GetCosmosDBSQLDatabaseE is a helper function that gets a SQL database.

func GetCosmosDBSQLDatabaseThroughput added in v0.31.3

func GetCosmosDBSQLDatabaseThroughput(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string, databaseName string) *documentdb.ThroughputSettingsGetResults

GetCosmosDBSQLDatabaseThroughput is a helper function that gets a SQL database throughput configuration. This function would fail the test if there is an error.

func GetCosmosDBSQLDatabaseThroughputE added in v0.31.3

func GetCosmosDBSQLDatabaseThroughputE(t testing.TestingT, subscriptionID string, resourceGroupName string, accountName string, databaseName string) (*documentdb.ThroughputSettingsGetResults, error)

GetCosmosDBSQLDatabaseThroughputE is a helper function that gets a SQL database throughput configuration.

func GetCustomNsgRulesClient added in v0.30.4

func GetCustomNsgRulesClient(t *testing.T, subscriptionID string) network.SecurityRulesClient

GetCustomNsgRulesClient returns a rules client which can be used to read the list of *custom* security rules defined on an 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.

func GetCustomNsgRulesClientE added in v0.30.4

func GetCustomNsgRulesClientE(subscriptionID string) (network.SecurityRulesClient, error)

GetCustomNsgRulesClientE returns a rules client which can be used to read the list of *custom* security rules defined on an network security group. Note that the "custom" rules are those defined by end users.

func GetDatabaseClient added in v0.30.9

func GetDatabaseClient(subscriptionID string) (*sql.DatabasesClient, error)

GetDatabaseClient is a helper function that will setup a sql DB client

func GetDefaultNsgRulesClient added in v0.30.4

func GetDefaultNsgRulesClient(t *testing.T, subscriptionID string) network.DefaultSecurityRulesClient

GetDefaultNsgRulesClient returns a rules client which can be used to read the list of *default* security rules defined on an 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.

func GetDefaultNsgRulesClientE added in v0.30.4

func GetDefaultNsgRulesClientE(subscriptionID string) (network.DefaultSecurityRulesClient, error)

GetDefaultNsgRulesClientE returns a rules client which can be used to read the list of *default* security rules defined on an network security group. Note that the "default" rules are those provided implicitly by the Azure platform.

func GetDiagnosticsSettingsClientE added in v0.30.26

func GetDiagnosticsSettingsClientE(subscriptionID string) (*insights.DiagnosticSettingsClient, error)

GetDiagnosticsSettingsClientE returns a diagnostics settings client

func GetDiagnosticsSettingsResource added in v0.30.26

func GetDiagnosticsSettingsResource(t testing.TestingT, name string, resourceURI string, subscriptionID string) *insights.DiagnosticSettingsResource

GetDiagnosticsSettingsResource gets the diagnostics settings for a specified resource This function would fail the test if there is an error.

func GetDiagnosticsSettingsResourceE added in v0.30.26

func GetDiagnosticsSettingsResourceE(name string, resourceURI string, subscriptionID string) (*insights.DiagnosticSettingsResource, error)

GetDiagnosticsSettingsResourceE gets the diagnostics settings for a specified resource

func GetDisk added in v0.30.12

func GetDisk(t testing.TestingT, diskName string, resGroupName string, subscriptionID string) *compute.Disk

GetDisk returns a Disk in the specified Azure Resource Group This function would fail the test if there is an error.

func GetDiskClientE added in v0.30.12

func GetDiskClientE(subscriptionID string) (*compute.DisksClient, error)

GetDiskClientE returns a new Disk client in the specified Azure Subscription

func GetDiskE added in v0.30.12

func GetDiskE(diskName string, resGroupName string, subscriptionID string) (*compute.Disk, error)

GetDiskE returns a Disk in the specified Azure Resource Group

func GetIPOfPublicIPAddressByName added in v0.30.6

func GetIPOfPublicIPAddressByName(t testing.TestingT, publicAddressName string, resGroupName string, subscriptionID string) string

GetIPOfPublicIPAddressByName gets the Public IP of the Public IP Address specified. This function would fail the test if there is an error.

func GetIPOfPublicIPAddressByNameE added in v0.30.6

func GetIPOfPublicIPAddressByNameE(publicAddressName string, resGroupName string, subscriptionID string) (string, error)

GetIPOfPublicIPAddressByNameE gets the Public IP of the Public IP Address specified.

func GetKeyVault added in v0.31.5

func GetKeyVault(t *testing.T, resGroupName string, keyVaultName string, subscriptionID string) *kvmng.Vault

GetKeyVault is a helper function that gets the keyvault management object. This function would fail the test if there is an error.

func GetKeyVaultClientE added in v0.31.5

func GetKeyVaultClientE() (*keyvault.BaseClient, error)

GetKeyVaultClientE creates a KeyVault client.

func GetKeyVaultE added in v0.31.5

func GetKeyVaultE(t *testing.T, resGroupName string, keyVaultName string, subscriptionID string) (*kvmng.Vault, error)

GetKeyVaultE is a helper function that gets the keyvault management object.

func GetKeyVaultManagementClientE added in v0.31.5

func GetKeyVaultManagementClientE(subscriptionID string) (*kvmng.VaultsClient, error)

GetKeyVaultManagementClientE is a helper function that will setup a key vault management client

func GetKeyVaultURISuffixE added in v0.31.5

func GetKeyVaultURISuffixE() (string, error)

GetKeyVaultURISuffixE returns the proper KeyVault URI suffix for the configured Azure environment. This function would fail the test if there is an error.

func GetLoadBalancer added in v0.30.13

func GetLoadBalancer(t testing.TestingT, loadBalancerName string, resourceGroupName string, subscriptionID string) *network.LoadBalancer

GetLoadBalancer gets a Load Balancer network resource in the specified Azure Resource Group. This function would fail the test if there is an error.

func GetLoadBalancerClientE added in v0.30.13

func GetLoadBalancerClientE(subscriptionID string) (*network.LoadBalancersClient, error)

GetLoadBalancerClientE gets a new Load Balancer client in the specified Azure Subscription.

func GetLoadBalancerE added in v0.30.13

func GetLoadBalancerE(loadBalancerName string, resourceGroupName string, subscriptionID string) (*network.LoadBalancer, error)

GetLoadBalancerE gets a Load Balancer network resource in the specified Azure Resource Group.

func GetLoadBalancerFrontendIPConfig added in v0.30.13

func GetLoadBalancerFrontendIPConfig(t testing.TestingT, feConfigName string, loadBalancerName string, resourceGroupName string, subscriptionID string) *network.FrontendIPConfiguration

GetLoadBalancerFrontendIPConfig gets the specified Load Balancer Frontend IP Configuration network resource. This function would fail the test if there is an error.

func GetLoadBalancerFrontendIPConfigClientE added in v0.30.13

func GetLoadBalancerFrontendIPConfigClientE(subscriptionID string) (*network.LoadBalancerFrontendIPConfigurationsClient, error)

GetLoadBalancerFrontendIPConfigClientE gets a new Load Balancer Frontend IP Configuration client in the specified Azure Subscription.

func GetLoadBalancerFrontendIPConfigE added in v0.30.13

func GetLoadBalancerFrontendIPConfigE(feConfigName string, loadBalancerName string, resourceGroupName string, subscriptionID string) (*network.FrontendIPConfiguration, error)

GetLoadBalancerFrontendIPConfigE gets the specified Load Balancer Frontend IP Configuration network resource.

func GetLoadBalancerFrontendIPConfigNames added in v0.30.13

func GetLoadBalancerFrontendIPConfigNames(t testing.TestingT, loadBalancerName string, resourceGroupName string, subscriptionID string) []string

GetLoadBalancerFrontendIPConfigNames gets a list of the Frontend IP Configuration Names for the Load Balancer. This function would fail the test if there is an error.

func GetLoadBalancerFrontendIPConfigNamesE added in v0.30.13

func GetLoadBalancerFrontendIPConfigNamesE(loadBalancerName string, resourceGroupName string, subscriptionID string) ([]string, error)

GetLoadBalancerFrontendIPConfigNamesE ConfigNamesE gets a list of the Frontend IP Configuration Names for the Load Balancer.

func GetLogAnalyticsWorkspace added in v0.32.7

func GetLogAnalyticsWorkspace(t testing.TestingT, workspaceName string, resourceGroupName string, subscriptionID string) *operationalinsights.Workspace

GetLogAnalyticsWorkspace gets an operational insights workspace if it exists in a subscription. This function would fail the test if there is an error.

func GetLogAnalyticsWorkspaceE added in v0.32.7

func GetLogAnalyticsWorkspaceE(workspaceName, resoureGroupName, subscriptionID string) (*operationalinsights.Workspace, error)

GetLogAnalyticsWorkspaceE gets an operational insights workspace if it exists in a subscription.

func GetLogAnalyticsWorkspacesClientE added in v0.32.7

func GetLogAnalyticsWorkspacesClientE(subscriptionID string) (*operationalinsights.WorkspacesClient, error)

GetLogAnalyticsWorkspacesClientE return workspaces client; otherwise error.

func GetMYSQLDB added in v0.30.20

func GetMYSQLDB(t testing.TestingT, resGroupName string, serverName string, dbName string, subscriptionID string) *mysql.Database

GetMYSQLDB is a helper function that gets the database. This function would fail the test if there is an error.

func GetMYSQLDBClientE added in v0.30.20

func GetMYSQLDBClientE(subscriptionID string) (*mysql.DatabasesClient, error)

GetMYSQLDBClientE is a helper function that will setup a mysql DB client.

func GetMYSQLDBE added in v0.30.20

func GetMYSQLDBE(t testing.TestingT, subscriptionID string, resGroupName string, serverName string, dbName string) (*mysql.Database, error)

GetMYSQLDBE is a helper function that gets the database.

func GetMYSQLServer added in v0.30.20

func GetMYSQLServer(t testing.TestingT, resGroupName string, serverName string, subscriptionID string) *mysql.Server

GetMYSQLServer is a helper function that gets the server. This function would fail the test if there is an error.

func GetMYSQLServerClientE added in v0.30.20

func GetMYSQLServerClientE(subscriptionID string) (*mysql.ServersClient, error)

GetMYSQLServerClientE is a helper function that will setup a mysql server client.

func GetMYSQLServerE added in v0.30.20

func GetMYSQLServerE(t testing.TestingT, subscriptionID string, resGroupName string, serverName string) (*mysql.Server, error)

GetMYSQLServerE is a helper function that gets the server.

func GetManagedClusterE added in v0.24.2

func GetManagedClusterE(t testing.TestingT, resourceGroupName, clusterName, subscriptionID string) (*containerservice.ManagedCluster, error)

GetManagedClusterE will return ManagedCluster

func GetManagedClustersClientE added in v0.24.2

func GetManagedClustersClientE(subscriptionID string) (*containerservice.ManagedClustersClient, error)

GetManagedClustersClientE is a helper function that will setup an Azure ManagedClusters client on your behalf

func GetNameFromResourceID added in v0.30.3

func GetNameFromResourceID(resourceID string) string

GetNameFromResourceID gets the Name from an Azure Resource ID.

func GetNameFromResourceIDE added in v0.30.12

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 GetNetworkInterfaceClientE added in v0.30.6

func GetNetworkInterfaceClientE(subscriptionID string) (*network.InterfacesClient, error)

GetNetworkInterfaceClientE creates a new Network Interface client in the specified Azure Subscription.

func GetNetworkInterfaceConfigurationClientE added in v0.30.6

func GetNetworkInterfaceConfigurationClientE(subscriptionID string) (*network.InterfaceIPConfigurationsClient, error)

GetNetworkInterfaceConfigurationClientE creates a new Network Interface Configuration client in the specified Azure Subscription.

func GetNetworkInterfaceConfigurationE added in v0.30.6

func GetNetworkInterfaceConfigurationE(nicName string, nicConfigName string, resGroupName string, subscriptionID string) (*network.InterfaceIPConfiguration, error)

GetNetworkInterfaceConfigurationE gets a Network Interface Configuration in the specified Azure Resource Group.

func GetNetworkInterfaceE added in v0.30.6

func GetNetworkInterfaceE(nicName string, resGroupName string, subscriptionID string) (*network.Interface, error)

GetNetworkInterfaceE gets a Network Interface in the specified Azure Resource Group.

func GetNetworkInterfacePrivateIPs added in v0.30.6

func GetNetworkInterfacePrivateIPs(t testing.TestingT, nicName string, resGroupName string, subscriptionID string) []string

GetNetworkInterfacePrivateIPs gets a list of the Private IPs of a Network Interface configs. This function would fail the test if there is an error.

func GetNetworkInterfacePrivateIPsE added in v0.30.6

func GetNetworkInterfacePrivateIPsE(nicName string, resGroupName string, subscriptionID string) ([]string, error)

GetNetworkInterfacePrivateIPsE gets a list of the Private IPs of a Network Interface configs.

func GetNetworkInterfacePublicIPs added in v0.30.6

func GetNetworkInterfacePublicIPs(t testing.TestingT, nicName string, resGroupName string, subscriptionID string) []string

GetNetworkInterfacePublicIPs 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.

func GetNetworkInterfacePublicIPsE added in v0.30.6

func GetNetworkInterfacePublicIPsE(nicName string, resGroupName string, subscriptionID string) ([]string, error)

GetNetworkInterfacePublicIPsE returns a list of all the Public IPs found in the Network Interface configurations.

func GetPublicIPAddressClientE added in v0.30.6

func GetPublicIPAddressClientE(subscriptionID string) (*network.PublicIPAddressesClient, error)

GetPublicIPAddressClientE creates a Public IP Addresses client in the specified Azure Subscription.

func GetPublicIPAddressE added in v0.30.6

func GetPublicIPAddressE(publicIPAddressName string, resGroupName string, subscriptionID string) (*network.PublicIPAddress, error)

GetPublicIPAddressE gets a Public IP Addresses in the specified Azure Resource Group.

func GetRandomRegion

func GetRandomRegion(t testing.TestingT, approvedRegions []string, forbiddenRegions []string, subscriptionID string) string

GetRandomRegion 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.

func GetRandomRegionE

func GetRandomRegionE(t testing.TestingT, approvedRegions []string, forbiddenRegions []string, subscriptionID string) (string, error)

GetRandomRegionE 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

func GetRandomStableRegion

func GetRandomStableRegion(t testing.TestingT, approvedRegions []string, forbiddenRegions []string, subscriptionID string) string

GetRandomStableRegion gets a randomly chosen Azure region that is considered stable. Like GetRandomRegion, 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.

func GetRecoveryServicesVaultBackupPolicyList added in v0.31.2

func GetRecoveryServicesVaultBackupPolicyList(t *testing.T, vaultName, resourceGroupName, subscriptionID string) map[string]backup.ProtectionPolicyResource

GetRecoveryServicesVaultBackupPolicyList returns a list of backup policies for the given vault. This function would fail the test if there is an error.

func GetRecoveryServicesVaultBackupPolicyListE added in v0.31.2

func GetRecoveryServicesVaultBackupPolicyListE(vaultName, resourceGroupName, subscriptionID string) (map[string]backup.ProtectionPolicyResource, error)

GetRecoveryServicesVaultBackupPolicyListE returns a list of backup policies for the given vault.

func GetRecoveryServicesVaultBackupProtectedVMList added in v0.31.2

func GetRecoveryServicesVaultBackupProtectedVMList(t *testing.T, policyName, vaultName, resourceGroupName, subscriptionID string) map[string]backup.AzureIaaSComputeVMProtectedItem

GetRecoveryServicesVaultBackupProtectedVMList returns a list of protected VM's on the given vault/policy. This function would fail the test if there is an error.

func GetRecoveryServicesVaultBackupProtectedVMListE added in v0.31.2

func GetRecoveryServicesVaultBackupProtectedVMListE(policyName, vaultName, resourceGroupName, subscriptionID string) (map[string]backup.AzureIaaSComputeVMProtectedItem, error)

GetRecoveryServicesVaultBackupProtectedVMListE returns a list of protected VM's on the given vault/policy.

func GetRecoveryServicesVaultE added in v0.31.2

func GetRecoveryServicesVaultE(vaultName, resourceGroupName, subscriptionID string) (*recoveryservices.Vault, error)

GetRecoveryServicesVaultE returns a vault instance.

func GetResourceGroupClientE added in v0.30.12

func GetResourceGroupClientE(subscriptionID string) (*resources.GroupsClient, error)

GetResourceGroupClientE gets a resource group client in a subscription

func GetResourceGroupE added in v0.30.12

func GetResourceGroupE(resourceGroupName, subscriptionID string) (bool, error)

GetResourceGroupE gets a resource group within a subscription

func GetSQLDatabase added in v0.30.9

func GetSQLDatabase(t testing.TestingT, resGroupName string, serverName string, dbName string, subscriptionID string) *sql.Database

GetSQLDatabase is a helper function that gets the sql db. This function would fail the test if there is an error.

func GetSQLDatabaseE added in v0.30.9

func GetSQLDatabaseE(t testing.TestingT, subscriptionID string, resGroupName string, serverName string, dbName string) (*sql.Database, error)

GetSQLDatabaseE is a helper function that gets the sql db.

func GetSQLServer added in v0.30.9

func GetSQLServer(t testing.TestingT, resGroupName string, serverName string, subscriptionID string) *sql.Server

GetSQLServer is a helper function that gets the sql server object. This function would fail the test if there is an error.

func GetSQLServerClient added in v0.30.9

func GetSQLServerClient(subscriptionID string) (*sql.ServersClient, error)

GetSQLServerClient is a helper function that will setup a sql server client

func GetSQLServerE added in v0.30.9

func GetSQLServerE(t testing.TestingT, subscriptionID string, resGroupName string, serverName string) (*sql.Server, error)

GetSQLServerE is a helper function that gets the sql server object.

func GetSizeOfVirtualMachine

func GetSizeOfVirtualMachine(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) compute.VirtualMachineSizeTypes

GetSizeOfVirtualMachine gets the Size Type of the specified Azure Virtual Machine. This function would fail the test if there is an error.

func GetSizeOfVirtualMachineE

func GetSizeOfVirtualMachineE(vmName string, resGroupName string, subscriptionID string) (compute.VirtualMachineSizeTypes, error)

GetSizeOfVirtualMachineE gets the Size Type of the specified Azure Virtual Machine.

func GetStorageAccountClientE added in v0.32.5

func GetStorageAccountClientE(subscriptionID string) (*storage.AccountsClient, error)

GetStorageAccountClientE creates a storage account client.

func GetStorageAccountE added in v0.32.5

func GetStorageAccountE(storageAccountName, resourceGroupName, subscriptionID string) (*storage.Account, error)

GetStorageAccountE gets a storage account; otherwise error. See https://docs.microsoft.com/rest/api/storagerp/storageaccounts/getproperties for more information.

func GetStorageAccountKind added in v0.32.5

func GetStorageAccountKind(t *testing.T, storageAccountName string, resourceGroupName string, subscriptionID string) string

GetStorageAccountKind returns one of Storage, StorageV2, BlobStorage, FileStorage, or BlockBlobStorage. This function would fail the test if there is an error.

func GetStorageAccountKindE added in v0.32.5

func GetStorageAccountKindE(storageAccountName, resourceGroupName, subscriptionID string) (string, error)

GetStorageAccountKindE returns one of Storage, StorageV2, BlobStorage, FileStorage, or BlockBlobStorage.

func GetStorageAccountPrimaryBlobEndpointE added in v0.32.5

func GetStorageAccountPrimaryBlobEndpointE(storageAccountName, resourceGroupName, subscriptionID string) (string, error)

GetStorageAccountPrimaryBlobEndpointE gets the storage account blob endpoint as URI string.

func GetStorageAccountPropertyE added in v0.32.5

func GetStorageAccountPropertyE(storageAccountName, resourceGroupName, subscriptionID string) (*storage.Account, error)

GetStorageAccountPropertyE returns StorageAccount properties.

func GetStorageAccountSkuTier added in v0.32.5

func GetStorageAccountSkuTier(t *testing.T, storageAccountName string, resourceGroupName string, subscriptionID string) string

GetStorageAccountSkuTier returns the storage account sku tier as Standard or Premium. This function would fail the test if there is an error.

func GetStorageAccountSkuTierE added in v0.32.5

func GetStorageAccountSkuTierE(storageAccountName, resourceGroupName, subscriptionID string) (string, error)

GetStorageAccountSkuTierE returns the storage account sku tier as Standard or Premium.

func GetStorageBlobContainerClientE added in v0.32.5

func GetStorageBlobContainerClientE(subscriptionID string) (*storage.BlobContainersClient, error)

GetStorageBlobContainerClientE creates a storage container client.

func GetStorageBlobContainerE added in v0.32.5

func GetStorageBlobContainerE(containerName, storageAccountName, resourceGroupName, subscriptionID string) (*storage.BlobContainer, error)

GetStorageBlobContainerE returns Blob container client.

func GetStorageBlobContainerPublicAccess added in v0.32.5

func GetStorageBlobContainerPublicAccess(t *testing.T, containerName string, storageAccountName string, resourceGroupName string, subscriptionID string) bool

GetStorageBlobContainerPublicAccess indicates whether a storage container has public access; otherwise false. This function would fail the test if there is an error.

func GetStorageBlobContainerPublicAccessE added in v0.32.5

func GetStorageBlobContainerPublicAccessE(containerName, storageAccountName, resourceGroupName, subscriptionID string) (bool, error)

GetStorageBlobContainerPublicAccessE indicates whether a storage container has public access; otherwise false.

func GetStorageDNSString added in v0.32.5

func GetStorageDNSString(t *testing.T, storageAccountName string, resourceGroupName string, subscriptionID string) string

GetStorageDNSString builds and returns the storage account dns string if the storage account exists. This function would fail the test if there is an error.

func GetStorageDNSStringE added in v0.32.5

func GetStorageDNSStringE(storageAccountName, resourceGroupName, subscriptionID string) (string, error)

GetStorageDNSStringE builds and returns the storage account dns string if the storage account exists.

func GetStorageURISuffixE added in v0.32.5

func GetStorageURISuffixE() (string, error)

GetStorageURISuffixE returns the proper storage URI suffix for the configured Azure environment.

func GetSubnetClientE added in v0.30.6

func GetSubnetClientE(subscriptionID string) (*network.SubnetsClient, error)

GetSubnetClientE creates a subnet client.

func GetSubnetE added in v0.30.6

func GetSubnetE(subnetName string, vnetName string, resGroupName string, subscriptionID string) (*network.Subnet, error)

GetSubnetE gets a subnet.

func GetSubscriptionClientE added in v0.31.1

func GetSubscriptionClientE() (*subscriptions.Client, error)

GetSubscriptionClientE is a helper function that will setup an Azure Subscription client on your behalf

func GetTargetAzureResourceGroupName added in v0.29.1

func GetTargetAzureResourceGroupName(resourceGroupName string) (string, error)

GetTargetAzureResourceGroupName is a helper function to find the correct target Azure Resource Group name, with provided arguments taking precedence over environment variables

func GetTargetAzureSubscription added in v0.29.1

func GetTargetAzureSubscription(subscriptionID string) (string, error)

GetTargetAzureSubscription is a helper function to find the correct target Azure Subscription ID, with provided arguments taking precedence over environment variables

func GetVMInsightsClientE added in v0.30.26

func GetVMInsightsClientE(t testing.TestingT, subscriptionID string) (*insights.VMInsightsClient, error)

GetVMInsightsClientE gets a VM Insights client

func GetVMInsightsOnboardingStatus added in v0.30.26

func GetVMInsightsOnboardingStatus(t testing.TestingT, resourceURI string, subscriptionID string) *insights.VMInsightsOnboardingStatus

GetVMInsightsOnboardingStatus get diagnostics VM onboarding status This function would fail the test if there is an error.

func GetVMInsightsOnboardingStatusE added in v0.30.26

func GetVMInsightsOnboardingStatusE(t testing.TestingT, resourceURI string, subscriptionID string) (*insights.VMInsightsOnboardingStatus, error)

GetVMInsightsOnboardingStatusE get diagnostics VM onboarding status

func GetVirtualMachine added in v0.30.12

func GetVirtualMachine(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) *compute.VirtualMachine

GetVirtualMachine gets a Virtual Machine in the specified Azure Resource Group. This function would fail the test if there is an error.

func GetVirtualMachineAvailabilitySetID added in v0.30.12

func GetVirtualMachineAvailabilitySetID(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) string

GetVirtualMachineAvailabilitySetID gets the Availability Set ID of the specified Azure Virtual Machine. This function would fail the test if there is an error.

func GetVirtualMachineAvailabilitySetIDE added in v0.30.12

func GetVirtualMachineAvailabilitySetIDE(vmName string, resGroupName string, subscriptionID string) (string, error)

GetVirtualMachineAvailabilitySetIDE gets the Availability Set ID of the specified Azure Virtual Machine.

func GetVirtualMachineClient

func GetVirtualMachineClient(t testing.TestingT, subscriptionID string) *compute.VirtualMachinesClient

GetVirtualMachineClient is a helper function that will setup an Azure Virtual Machine client on your behalf.

func GetVirtualMachineClientE added in v0.30.3

func GetVirtualMachineClientE(subscriptionID string) (*compute.VirtualMachinesClient, error)

GetVirtualMachineClientE is a helper function that will setup an Azure Virtual Machine client on your behalf.

func GetVirtualMachineE added in v0.30.12

func GetVirtualMachineE(vmName string, resGroupName string, subscriptionID string) (*compute.VirtualMachine, error)

GetVirtualMachineE gets a Virtual Machine in the specified Azure Resource Group.

func GetVirtualMachineManagedDisks added in v0.30.12

func GetVirtualMachineManagedDisks(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) []string

GetVirtualMachineManagedDisks gets the list of Managed Disk names of the specified Azure Virtual Machine. This function would fail the test if there is an error.

func GetVirtualMachineManagedDisksE added in v0.30.12

func GetVirtualMachineManagedDisksE(vmName string, resGroupName string, subscriptionID string) ([]string, error)

GetVirtualMachineManagedDisksE gets the list of Managed Disk names of the specified Azure Virtual Machine.

func GetVirtualMachineNics added in v0.30.12

func GetVirtualMachineNics(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) []string

GetVirtualMachineNics gets a list of Network Interface names for a specifcied Azure Virtual Machine. This function would fail the test if there is an error.

func GetVirtualMachineNicsE added in v0.30.12

func GetVirtualMachineNicsE(vmName string, resGroupName string, subscriptionID string) ([]string, error)

GetVirtualMachineNicsE gets a list of Network Interface names for a specified Azure Virtual Machine.

func GetVirtualMachineOSDiskName added in v0.30.12

func GetVirtualMachineOSDiskName(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) string

GetVirtualMachineOSDiskName gets the OS Disk name of the specified Azure Virtual Machine. This function would fail the test if there is an error.

func GetVirtualMachineOSDiskNameE added in v0.30.12

func GetVirtualMachineOSDiskNameE(vmName string, resGroupName string, subscriptionID string) (string, error)

GetVirtualMachineOSDiskNameE gets the OS Disk name of the specified Azure Virtual Machine.

func GetVirtualMachineTags added in v0.30.12

func GetVirtualMachineTags(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) map[string]string

GetVirtualMachineTags gets the Tags of the specified Virtual Machine as a map. This function would fail the test if there is an error.

func GetVirtualMachineTagsE added in v0.30.12

func GetVirtualMachineTagsE(vmName string, resGroupName string, subscriptionID string) (map[string]string, error)

GetVirtualMachineTagsE gets the Tags of the specified Virtual Machine as a map.

func GetVirtualMachinesForResourceGroup added in v0.30.12

func GetVirtualMachinesForResourceGroup(t testing.TestingT, resGroupName string, subscriptionID string) map[string]compute.VirtualMachineProperties

GetVirtualMachinesForResourceGroup 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.

func GetVirtualMachinesForResourceGroupE added in v0.30.12

func GetVirtualMachinesForResourceGroupE(resourceGroupName string, subscriptionID string) (map[string]compute.VirtualMachineProperties, error)

GetVirtualMachinesForResourceGroupE 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.

func GetVirtualNetworkDNSServerIPs added in v0.30.6

func GetVirtualNetworkDNSServerIPs(t testing.TestingT, vnetName string, resGroupName string, subscriptionID string) []string

GetVirtualNetworkDNSServerIPs gets a list of all Virtual Network DNS server IPs. This function would fail the test if there is an error.

func GetVirtualNetworkDNSServerIPsE added in v0.30.6

func GetVirtualNetworkDNSServerIPsE(vnetName string, resGroupName string, subscriptionID string) ([]string, error)

GetVirtualNetworkDNSServerIPsE gets a list of all Virtual Network DNS server IPs with Error.

func GetVirtualNetworkE added in v0.30.6

func GetVirtualNetworkE(vnetName string, resGroupName string, subscriptionID string) (*network.VirtualNetwork, error)

GetVirtualNetworkE gets Virtual Network in the specified Azure Resource Group.

func GetVirtualNetworkSubnets added in v0.30.6

func GetVirtualNetworkSubnets(t testing.TestingT, vnetName string, resGroupName string, subscriptionID string) map[string]string

GetVirtualNetworkSubnets 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.

func GetVirtualNetworkSubnetsE added in v0.30.6

func GetVirtualNetworkSubnetsE(vnetName string, resGroupName string, subscriptionID string) (map[string]string, error)

GetVirtualNetworkSubnetsE 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.

func GetVirtualNetworksClientE added in v0.30.6

func GetVirtualNetworksClientE(subscriptionID string) (*network.VirtualNetworksClient, error)

GetVirtualNetworksClientE creates a virtual network client in the specified Azure Subscription.

func KeyVaultCertificateExists added in v0.31.5

func KeyVaultCertificateExists(t *testing.T, keyVaultName string, certificateName string) bool

KeyVaultCertificateExists indicates whether a key vault certificate exists; otherwise false. This function would fail the test if there is an error.

func KeyVaultCertificateExistsE added in v0.31.5

func KeyVaultCertificateExistsE(keyVaultName, certificateName string) (bool, error)

KeyVaultCertificateExistsE indicates whether a certificate exists in key vault; otherwise false.

func KeyVaultKeyExists added in v0.31.5

func KeyVaultKeyExists(t *testing.T, keyVaultName string, keyName string) bool

KeyVaultKeyExists indicates whether a key vault key exists; otherwise false. This function would fail the test if there is an error.

func KeyVaultKeyExistsE added in v0.31.5

func KeyVaultKeyExistsE(keyVaultName, keyName string) (bool, error)

KeyVaultKeyExistsE indicates whether a key exists in the key vault; otherwise false.

func KeyVaultSecretExists added in v0.31.5

func KeyVaultSecretExists(t *testing.T, keyVaultName string, secretName string) bool

KeyVaultSecretExists indicates whether a key vault secret exists; otherwise false This function would fail the test if there is an error.

func KeyVaultSecretExistsE added in v0.31.5

func KeyVaultSecretExistsE(keyVaultName, secretName string) (bool, error)

KeyVaultSecretExistsE indicates whether a secret exists in the key vault; otherwise false.

func ListMySQLDB added in v0.30.20

func ListMySQLDB(t testing.TestingT, resGroupName string, serverName string, subscriptionID string) []mysql.Database

ListMySQLDB is a helper function that gets all databases per server.

func ListMySQLDBE added in v0.30.20

func ListMySQLDBE(t testing.TestingT, subscriptionID string, resGroupName string, serverName string) ([]mysql.Database, error)

ListMySQLDBE is a helper function that gets all databases per server.

func ListSQLServerDatabases added in v0.30.9

func ListSQLServerDatabases(t testing.TestingT, resGroupName string, serverName string, subscriptionID string) *[]sql.Database

ListSQLServerDatabases is a helper function that gets a list of databases on a sql server

func ListSQLServerDatabasesE added in v0.30.9

func ListSQLServerDatabasesE(t testing.TestingT, resGroupName string, serverName string, subscriptionID string) (*[]sql.Database, error)

ListSQLServerDatabasesE is a helper function that gets a list of databases on a sql server

func ListVirtualMachinesForResourceGroup added in v0.30.12

func ListVirtualMachinesForResourceGroup(t testing.TestingT, resGroupName string, subscriptionID string) []string

ListVirtualMachinesForResourceGroup gets a list of all Virtual Machine names in the specified Resource Group. This function would fail the test if there is an error.

func ListVirtualMachinesForResourceGroupE added in v0.30.12

func ListVirtualMachinesForResourceGroupE(resourceGroupName string, subscriptionID string) ([]string, error)

ListVirtualMachinesForResourceGroupE gets a list of all Virtual Machine names in the specified Resource Group.

func LoadBalancerExists added in v0.30.13

func LoadBalancerExists(t testing.TestingT, loadBalancerName string, resourceGroupName string, subscriptionID string) bool

LoadBalancerExists indicates whether the specified Load Balancer exists. This function would fail the test if there is an error.

func LoadBalancerExistsE added in v0.30.13

func LoadBalancerExistsE(loadBalancerName string, resourceGroupName string, subscriptionID string) (bool, error)

LoadBalancerExistsE indicates whether the specified Load Balancer exists.

func LogAnalyticsWorkspaceExists added in v0.32.7

func LogAnalyticsWorkspaceExists(t testing.TestingT, workspaceName string, resourceGroupName string, subscriptionID string) bool

LogAnalyticsWorkspaceExists indicates whether the operatonal insights workspaces exists. This function would fail the test if there is an error.

func LogAnalyticsWorkspaceExistsE added in v0.32.7

func LogAnalyticsWorkspaceExistsE(workspaceName string, resourceGroupName string, subscriptionID string) (bool, error)

LogAnalyticsWorkspaceExistsE indicates whether the operatonal insights workspaces exists and may return an error.

func NetworkInterfaceExists added in v0.30.6

func NetworkInterfaceExists(t testing.TestingT, nicName string, resGroupName string, subscriptionID string) bool

NetworkInterfaceExists indicates whether the specified Azure Network Interface exists. This function would fail the test if there is an error.

func NetworkInterfaceExistsE added in v0.30.6

func NetworkInterfaceExistsE(nicName string, resGroupName string, subscriptionID string) (bool, error)

NetworkInterfaceExistsE indicates whether the specified Azure Network Interface exists.

func NewAuthorizer

func NewAuthorizer() (*autorest.Authorizer, error)

NewAuthorizer creates an Azure authorizer adhering to standard auth mechanisms provided by the Azure Go SDK See Azure Go Auth docs here: https://docs.microsoft.com/en-us/go/azure/azure-sdk-go-authorization

func NewKeyVaultAuthorizerE added in v0.31.5

func NewKeyVaultAuthorizerE() (*autorest.Authorizer, error)

NewKeyVaultAuthorizerE will return dataplane Authorizer for KeyVault.

func PublicAddressExists added in v0.30.6

func PublicAddressExists(t testing.TestingT, publicAddressName string, resGroupName string, subscriptionID string) bool

PublicAddressExists indicates whether the specified AzurePublic Address exists. This function would fail the test if there is an error.

func PublicAddressExistsE added in v0.30.6

func PublicAddressExistsE(publicAddressName string, resGroupName string, subscriptionID string) (bool, error)

PublicAddressExistsE indicates whether the specified AzurePublic Address exists.

func RecoveryServicesVaultExists added in v0.31.2

func RecoveryServicesVaultExists(t *testing.T, vaultName, resourceGroupName, subscriptionID string) bool

RecoveryServicesVaultExists indicates whether a recovery services vault exists; otherwise false. This function would fail the test if there is an error.

func RecoveryServicesVaultExistsE added in v0.31.2

func RecoveryServicesVaultExistsE(vaultName, resourceGroupName, subscriptionID string) (bool, error)

RecoveryServicesVaultExists indicates whether a recovery services vault exists; otherwise false or error.

func ResourceGroupExists added in v0.30.12

func ResourceGroupExists(t *testing.T, resourceGroupName string, subscriptionID string) bool

ResourceGroupExists indicates whether a resource group exists within a subscription; otherwise false This function would fail the test if there is an error.

func ResourceGroupExistsE added in v0.30.12

func ResourceGroupExistsE(resourceGroupName, subscriptionID string) (bool, error)

ResourceGroupExistsE indicates whether a resource group exists within a subscription

func ResourceNotFoundErrorExists added in v0.30.6

func ResourceNotFoundErrorExists(err error) bool

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

func StorageAccountExists added in v0.32.5

func StorageAccountExists(t *testing.T, storageAccountName string, resourceGroupName string, subscriptionID string) bool

StorageAccountExists indicates whether the storage account name exactly matches; otherwise false. This function would fail the test if there is an error.

func StorageAccountExistsE added in v0.32.5

func StorageAccountExistsE(storageAccountName, resourceGroupName, subscriptionID string) (bool, error)

StorageAccountExistsE indicates whether the storage account name exists; otherwise false.

func StorageBlobContainerExists added in v0.32.5

func StorageBlobContainerExists(t *testing.T, containerName string, storageAccountName string, resourceGroupName string, subscriptionID string) bool

StorageBlobContainerExists returns true if the container name exactly matches; otherwise false This function would fail the test if there is an error.

func StorageBlobContainerExistsE added in v0.32.5

func StorageBlobContainerExistsE(containerName, storageAccountName, resourceGroupName, subscriptionID string) (bool, error)

StorageBlobContainerExistsE returns true if the container name exists; otherwise false.

func SubnetExists added in v0.30.6

func SubnetExists(t testing.TestingT, subnetName string, vnetName string, resGroupName string, subscriptionID string) bool

SubnetExists indicates whether the specified Azure Virtual Network Subnet exists. This function would fail the test if there is an error.

func SubnetExistsE added in v0.30.6

func SubnetExistsE(subnetName string, vnetName string, resGroupName string, subscriptionID string) (bool, error)

SubnetExistsE indicates whether the specified Azure Virtual Network Subnet exists.

func VirtualMachineExists added in v0.30.12

func VirtualMachineExists(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) bool

VirtualMachineExists indicates whether the specifcied Azure Virtual Machine exists. This function would fail the test if there is an error.

func VirtualMachineExistsE added in v0.30.12

func VirtualMachineExistsE(vmName string, resGroupName string, subscriptionID string) (bool, error)

VirtualMachineExistsE indicates whether the specifcied Azure Virtual Machine exists.

func VirtualNetworkExists added in v0.30.6

func VirtualNetworkExists(t testing.TestingT, vnetName string, resGroupName string, subscriptionID string) bool

VirtualNetworkExists indicates whether the specified Azure Virtual Network exists. This function would fail the test if there is an error.

func VirtualNetworkExistsE added in v0.30.6

func VirtualNetworkExistsE(vnetName string, resGroupName string, subscriptionID string) (bool, error)

VirtualNetworkExistsE indicates whether the specified Azure Virtual Network exists.

Types

type ClientType added in v0.31.1

type ClientType int

ClientType describes the type of client a module can create.

type FailedToParseError added in v0.30.6

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

FailedToParseError is returned when an object cannot be parsed

func NewFailedToParseError added in v0.30.6

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 added in v0.30.6

func (err FailedToParseError) Error() string

type Instance added in v0.30.12

type Instance struct {
	*compute.VirtualMachine
}

Instance of the VM

func (*Instance) GetVirtualMachineInstanceSize added in v0.30.12

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

GetVirtualMachineInstanceSize gets the size of the Virtual Machine.

type LoadBalancerIPType added in v0.30.13

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 GetIPOfLoadBalancerFrontendIPConfig added in v0.30.13

func GetIPOfLoadBalancerFrontendIPConfig(t testing.TestingT, feConfigName string, loadBalancerName string, resourceGroupName string, subscriptionID string) (ipAddress string, publicOrPrivate LoadBalancerIPType)

GetIPOfLoadBalancerFrontendIPConfig gets the IP and LoadBalancerIPType for the specified Load Balancer Frontend IP Configuration. This function would fail the test if there is an error.

func GetIPOfLoadBalancerFrontendIPConfigE added in v0.30.13

func GetIPOfLoadBalancerFrontendIPConfigE(feConfigName string, loadBalancerName string, resourceGroupName string, subscriptionID string) (ipAddress string, publicOrPrivate LoadBalancerIPType, err1 error)

GetIPOfLoadBalancerFrontendIPConfigE gets the IP and LoadBalancerIPType for the specified Load Balancer Frontend IP Configuration.

type NotFoundError added in v0.30.3

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

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

func NewNotFoundError added in v0.30.3

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 added in v0.30.3

func (err NotFoundError) Error() string

type NsgRuleSummary added in v0.30.4

type NsgRuleSummary struct {
	Name                     string
	Description              string
	Protocol                 string
	SourcePortRange          string
	DestinationPortRange     string
	SourceAddressPrefix      string
	DestinationAddressPrefix string
	Access                   string
	Priority                 int32
	Direction                string
}

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

func (*NsgRuleSummary) AllowsDestinationPort added in v0.30.4

func (summarizedRule *NsgRuleSummary) AllowsDestinationPort(t *testing.T, 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 added in v0.30.4

func (summarizedRule *NsgRuleSummary) AllowsSourcePort(t *testing.T, 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 added in v0.30.4

type NsgRuleSummaryList struct {
	SummarizedRules []NsgRuleSummary
}

NsgRuleSummaryList holds a colleciton of NsgRuleSummary rules

func GetAllNSGRules added in v0.30.4

func GetAllNSGRules(t *testing.T, resourceGroupName, nsgName, subscriptionID string) NsgRuleSummaryList

GetAllNSGRules returns an NsgRuleSummaryList instance containing the combined "default" and "custom" rules from a network security group. This function would fail the test if there is an error.

func GetAllNSGRulesE added in v0.30.4

func GetAllNSGRulesE(resourceGroupName, nsgName, subscriptionID string) (NsgRuleSummaryList, error)

GetAllNSGRulesE returns an NsgRuleSummaryList instance containing the combined "default" and "custom" rules from a network security group.

func (*NsgRuleSummaryList) FindRuleByName added in v0.30.4

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 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 VMImage added in v0.30.12

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

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

func GetVirtualMachineImage added in v0.30.12

func GetVirtualMachineImage(t testing.TestingT, vmName string, resGroupName string, subscriptionID string) VMImage

GetVirtualMachineImage gets the Image of the specified Azure Virtual Machine. This function would fail the test if there is an error.

func GetVirtualMachineImageE added in v0.30.12

func GetVirtualMachineImageE(vmName string, resGroupName string, subscriptionID string) (VMImage, error)

GetVirtualMachineImageE gets the Image of the specified Azure Virtual Machine.

Jump to

Keyboard shortcuts

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