armtestbase

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 15 Imported by: 1

README

Azure Test Base for M365 Module for Go

PkgGoDev

The armtestbase module provides operations for working with Azure Test Base for M365.

Source code

Getting started

Prerequisites

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

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Test Base for M365 module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase

Authorization

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

cred, err := azidentity.NewDefaultAzureCredential(nil)

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

Client Factory

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

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

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

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

Clients

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

client := clientFactory.NewEmailEventsClient()

Fakes

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

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

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Test Base for M365 label.

Contributing

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

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

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

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountListResult added in v0.2.0

type AccountListResult struct {
	// The list of Test Base Accounts.
	Value []*AccountResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

AccountListResult - A list of Test Base Accounts.

func (AccountListResult) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AccountListResult.

func (*AccountListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountListResult.

type AccountResource added in v0.2.0

type AccountResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Properties of a Test Base Account.
	Properties *AccountResourceProperties

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

	// READ-ONLY; Resource Etag.
	Etag *string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

AccountResource - The Test Base Account resource.

func (AccountResource) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AccountResource.

func (*AccountResource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountResource.

type AccountResourceProperties added in v0.2.0

type AccountResourceProperties struct {
	// REQUIRED; The SKU of the Test Base Account.
	SKU *AccountSKU

	// READ-ONLY; The access level of the Test Base Account.
	AccessLevel *string

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

AccountResourceProperties - The properties of a Test Base Account resource.

func (AccountResourceProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type AccountResourceProperties.

func (*AccountResourceProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountResourceProperties.

type AccountSKU added in v0.2.0

type AccountSKU struct {
	// REQUIRED; The name of the SKU. This is typically a letter + number code, such as B0 or S0.
	Name *string

	// REQUIRED; The tier of this particular SKU.
	Tier *Tier

	// The locations that the SKU is available.
	Locations []*string

	// The type of resource the SKU applies to.
	ResourceType *string

	// READ-ONLY; The capabilities of a SKU.
	Capabilities []*AccountSKUCapability
}

AccountSKU - Describes a Test Base Account SKU.

func (AccountSKU) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AccountSKU.

func (*AccountSKU) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountSKU.

type AccountSKUCapability added in v0.2.0

type AccountSKUCapability struct {
	// REQUIRED; An invariant to describe the feature, such as 'SLA'.
	Name *string

	// REQUIRED; An invariant if the feature is measured by quantity, such as 99.9%.
	Value *string
}

AccountSKUCapability - Properties of the Test Base Account SKU Capability.

func (AccountSKUCapability) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type AccountSKUCapability.

func (*AccountSKUCapability) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountSKUCapability.

type AccountSKUListResult added in v0.2.0

type AccountSKUListResult struct {
	// The list of Test Base Account SKUs.
	Value []*AccountSKU

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

AccountSKUListResult - A list of Test Base Account SKUs.

func (AccountSKUListResult) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AccountSKUListResult.

func (*AccountSKUListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountSKUListResult.

type AccountUpdateParameterProperties added in v0.2.0

type AccountUpdateParameterProperties struct {
	// The SKU of the Test Base Account.
	SKU *AccountSKU
}

AccountUpdateParameterProperties - Parameters supplied to update a Test Base Account.

func (AccountUpdateParameterProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type AccountUpdateParameterProperties.

func (*AccountUpdateParameterProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountUpdateParameterProperties.

type AccountUpdateParameters added in v0.2.0

type AccountUpdateParameters struct {
	// Test Base Account update parameters.
	Properties *AccountUpdateParameterProperties

	// The tags of the Test Base Account.
	Tags map[string]*string
}

AccountUpdateParameters - Parameters supplied to update a Test Base Account.

func (AccountUpdateParameters) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AccountUpdateParameters.

func (*AccountUpdateParameters) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountUpdateParameters.

type AccountUsageData added in v0.2.0

type AccountUsageData struct {
	// Current value for the usage quota.
	CurrentValue *int64

	// Fully qualified ARM resource id
	ID *string

	// The maximum permitted value for the usage quota. If there is no limit, this value will be -1.
	Limit *int64

	// Localizable String object containing the name and a localized value.
	Name *AccountUsageName

	// Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond.
	Unit *string
}

AccountUsageData - The usage data of a Test Base Account.

func (AccountUsageData) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type AccountUsageData.

func (*AccountUsageData) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountUsageData.

type AccountUsageDataList added in v0.2.0

type AccountUsageDataList struct {
	// The list of Test Base Account usage data.
	Value []*AccountUsageData

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

AccountUsageDataList - A list of Test Base Account usage data.

func (AccountUsageDataList) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AccountUsageDataList.

func (*AccountUsageDataList) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountUsageDataList.

type AccountUsageName added in v0.2.0

type AccountUsageName struct {
	// Localized name of the usage.
	LocalizedValue *string

	// The identifier of the usage.
	Value *string
}

AccountUsageName - Localizable String object containing the name and a localized value.

func (AccountUsageName) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type AccountUsageName.

func (*AccountUsageName) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountUsageName.

type AccountsClient added in v0.2.0

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

AccountsClient contains the methods for the TestBaseAccounts group. Don't use this type directly, use NewAccountsClient() instead.

func NewAccountsClient added in v0.2.0

func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error)

NewAccountsClient creates a new instance of AccountsClient with the specified values.

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

func (*AccountsClient) BeginCreate added in v0.2.0

func (client *AccountsClient) BeginCreate(ctx context.Context, resourceGroupName string, testBaseAccountName string, parameters AccountResource, options *AccountsClientBeginCreateOptions) (*runtime.Poller[AccountsClientCreateResponse], error)

BeginCreate - Create or replace (overwrite/recreate, with potential downtime) a Test Base Account in the specified subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • parameters - Parameters supplied to create a Test Base Account.
  • options - AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountCreate.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "contoso-rg1", "contoso-testBaseAccount1", armtestbase.AccountResource{
		Location: to.Ptr("westus"),
		Properties: &armtestbase.AccountResourceProperties{
			SKU: &armtestbase.AccountSKU{
				Name: to.Ptr("S0"),
				Tier: to.Ptr(armtestbase.TierStandard),
			},
		},
	}, &armtestbase.AccountsClientBeginCreateOptions{Restore: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccountResource = armtestbase.AccountResource{
	// 	Name: to.Ptr("contoso-testBaseAccount1"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armtestbase.AccountResourceProperties{
	// 		AccessLevel: to.Ptr("StandardAccess"),
	// 		ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
	// 		SKU: &armtestbase.AccountSKU{
	// 			Name: to.Ptr("S0"),
	// 			Capabilities: []*armtestbase.AccountSKUCapability{
	// 				{
	// 					Name: to.Ptr("SLA"),
	// 					Value: to.Ptr("99.9%"),
	// 				},
	// 				{
	// 					Name: to.Ptr("maximumPackageCount"),
	// 					Value: to.Ptr("5"),
	// 				},
	// 				{
	// 					Name: to.Ptr("packageMaximumRunSeconds"),
	// 					Value: to.Ptr("3600"),
	// 			}},
	// 			Tier: to.Ptr(armtestbase.TierStandard),
	// 		},
	// 	},
	// }
}
Output:

func (*AccountsClient) BeginDelete added in v0.2.0

func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, testBaseAccountName string, options *AccountsClientBeginDeleteOptions) (*runtime.Poller[AccountsClientDeleteResponse], error)

BeginDelete - Deletes a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAccountsClient().BeginDelete(ctx, "contoso-rg1", "contoso-testBaseAccount1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*AccountsClient) BeginOffboard added in v0.2.0

func (client *AccountsClient) BeginOffboard(ctx context.Context, resourceGroupName string, testBaseAccountName string, options *AccountsClientBeginOffboardOptions) (*runtime.Poller[AccountsClientOffboardResponse], error)

BeginOffboard - Offboard a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - AccountsClientBeginOffboardOptions contains the optional parameters for the AccountsClient.BeginOffboard method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountOffboard.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAccountsClient().BeginOffboard(ctx, "contoso-rg1", "contoso-testBaseAccount1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*AccountsClient) BeginUpdate added in v0.2.0

func (client *AccountsClient) BeginUpdate(ctx context.Context, resourceGroupName string, testBaseAccountName string, parameters AccountUpdateParameters, options *AccountsClientBeginUpdateOptions) (*runtime.Poller[AccountsClientUpdateResponse], error)

BeginUpdate - Update an existing Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • parameters - Parameters supplied to update a Test Base Account.
  • options - AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountUpdate.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAccountsClient().BeginUpdate(ctx, "contoso-rg1", "contoso-testBaseAccount1", armtestbase.AccountUpdateParameters{
		Properties: &armtestbase.AccountUpdateParameterProperties{
			SKU: &armtestbase.AccountSKU{
				Name: to.Ptr("S0"),
				Tier: to.Ptr(armtestbase.TierStandard),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccountResource = armtestbase.AccountResource{
	// 	Name: to.Ptr("contoso-testBaseAccount1"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armtestbase.AccountResourceProperties{
	// 		AccessLevel: to.Ptr("EarlyAccess"),
	// 		ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
	// 		SKU: &armtestbase.AccountSKU{
	// 			Name: to.Ptr("S0"),
	// 			Capabilities: []*armtestbase.AccountSKUCapability{
	// 				{
	// 					Name: to.Ptr("SLA"),
	// 					Value: to.Ptr("99.9%"),
	// 				},
	// 				{
	// 					Name: to.Ptr("maximumPackageCount"),
	// 					Value: to.Ptr("5"),
	// 				},
	// 				{
	// 					Name: to.Ptr("packageMaximumRunSeconds"),
	// 					Value: to.Ptr("3600"),
	// 			}},
	// 			Tier: to.Ptr(armtestbase.TierStandard),
	// 		},
	// 	},
	// }
}
Output:

func (*AccountsClient) CheckPackageNameAvailability added in v0.2.0

func (client *AccountsClient) CheckPackageNameAvailability(ctx context.Context, resourceGroupName string, testBaseAccountName string, parameters PackageCheckNameAvailabilityParameters, options *AccountsClientCheckPackageNameAvailabilityOptions) (AccountsClientCheckPackageNameAvailabilityResponse, error)

CheckPackageNameAvailability - Checks that the Test Base Package name and version is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • parameters - Parameters supplied to the Test Base Package CheckNameAvailability operation.
  • options - AccountsClientCheckPackageNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckPackageNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CheckPackageNameAvailability.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountsClient().CheckPackageNameAvailability(ctx, "contoso-rg1", "contoso-testBaseAccount1", armtestbase.PackageCheckNameAvailabilityParameters{
		Name:            to.Ptr("testApp"),
		Type:            to.Ptr("Microsoft.TestBase/testBaseAccounts/packages"),
		ApplicationName: to.Ptr("testApp"),
		Version:         to.Ptr("1.0.0"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameAvailabilityResult = armtestbase.CheckNameAvailabilityResult{
	// }
}
Output:

func (*AccountsClient) Get added in v0.2.0

func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error)

Get - Gets a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountsClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccountResource = armtestbase.AccountResource{
	// 	Name: to.Ptr("contoso-testBaseAccount1"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armtestbase.AccountResourceProperties{
	// 		AccessLevel: to.Ptr("EarlyAccess"),
	// 		ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
	// 		SKU: &armtestbase.AccountSKU{
	// 			Name: to.Ptr("S0"),
	// 			Capabilities: []*armtestbase.AccountSKUCapability{
	// 				{
	// 					Name: to.Ptr("SLA"),
	// 					Value: to.Ptr("99.9%"),
	// 				},
	// 				{
	// 					Name: to.Ptr("maximumPackageCount"),
	// 					Value: to.Ptr("5"),
	// 				},
	// 				{
	// 					Name: to.Ptr("packageMaximumRunSeconds"),
	// 					Value: to.Ptr("3600"),
	// 			}},
	// 			Tier: to.Ptr(armtestbase.TierStandard),
	// 		},
	// 	},
	// }
}
Output:

func (*AccountsClient) GetFileUploadURL added in v0.2.0

func (client *AccountsClient) GetFileUploadURL(ctx context.Context, resourceGroupName string, testBaseAccountName string, options *AccountsClientGetFileUploadURLOptions) (AccountsClientGetFileUploadURLResponse, error)

GetFileUploadURL - Gets the file upload URL of a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - AccountsClientGetFileUploadURLOptions contains the optional parameters for the AccountsClient.GetFileUploadURL method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountGetFileUploadUrl.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAccountsClient().GetFileUploadURL(ctx, "contoso-rg1", "contoso-testBaseAccount1", &armtestbase.AccountsClientGetFileUploadURLOptions{Parameters: &armtestbase.GetFileUploadURLParameters{
		BlobName: to.Ptr("package.zip"),
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.FileUploadURLResponse = armtestbase.FileUploadURLResponse{
	// 	BlobPath: to.Ptr("https://uslwestusdevsa.blob.core.windows.net/usltest/temp/20c0d7e0-1bb6-477f-bc04-57c734453000/package.zip"),
	// 	UploadURL: to.Ptr("https://uslwestusdevsa.blob.core.windows.net/usltest/temp/20c0d7e0-1bb6-477f-bc04-57c734453000/token"),
	// }
}
Output:

func (*AccountsClient) NewListByResourceGroupPager added in v0.4.0

func (client *AccountsClient) NewListByResourceGroupPager(resourceGroupName string, options *AccountsClientListByResourceGroupOptions) *runtime.Pager[AccountsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all the Test Base Accounts in a resource group.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • options - AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAccountsClient().NewListByResourceGroupPager("contoso-rg1", &armtestbase.AccountsClientListByResourceGroupOptions{GetDeleted: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AccountListResult = armtestbase.AccountListResult{
		// 	Value: []*armtestbase.AccountResource{
		// 		{
		// 			Name: to.Ptr("contoso-testBaseAccount1"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armtestbase.AccountResourceProperties{
		// 				AccessLevel: to.Ptr("EarlyAccess"),
		// 				ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
		// 				SKU: &armtestbase.AccountSKU{
		// 					Name: to.Ptr("S0"),
		// 					Capabilities: []*armtestbase.AccountSKUCapability{
		// 						{
		// 							Name: to.Ptr("SLA"),
		// 							Value: to.Ptr("99.9%"),
		// 						},
		// 						{
		// 							Name: to.Ptr("maximumPackageCount"),
		// 							Value: to.Ptr("5"),
		// 						},
		// 						{
		// 							Name: to.Ptr("packageMaximumRunSeconds"),
		// 							Value: to.Ptr("3600"),
		// 					}},
		// 					Tier: to.Ptr(armtestbase.TierStandard),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("contoso-testBaseAccount2"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg2/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount2"),
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armtestbase.AccountResourceProperties{
		// 				AccessLevel: to.Ptr("EarlyAccess"),
		// 				ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
		// 				SKU: &armtestbase.AccountSKU{
		// 					Name: to.Ptr("S0"),
		// 					Capabilities: []*armtestbase.AccountSKUCapability{
		// 						{
		// 							Name: to.Ptr("SLA"),
		// 							Value: to.Ptr("99.999%"),
		// 						},
		// 						{
		// 							Name: to.Ptr("maximumPackageCount"),
		// 							Value: to.Ptr("100"),
		// 						},
		// 						{
		// 							Name: to.Ptr("packageMaximumRunSeconds"),
		// 							Value: to.Ptr("10800"),
		// 					}},
		// 					Tier: to.Ptr(armtestbase.TierStandard),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AccountsClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Lists all the Test Base Accounts in a subscription. This API is required by ARM guidelines.

Generated from API version 2020-12-16-preview

  • options - AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountsListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAccountsClient().NewListBySubscriptionPager(&armtestbase.AccountsClientListBySubscriptionOptions{GetDeleted: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AccountListResult = armtestbase.AccountListResult{
		// 	Value: []*armtestbase.AccountResource{
		// 		{
		// 			Name: to.Ptr("contoso-testBaseAccount1"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armtestbase.AccountResourceProperties{
		// 				AccessLevel: to.Ptr("EarlyAccess"),
		// 				ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
		// 				SKU: &armtestbase.AccountSKU{
		// 					Name: to.Ptr("S0"),
		// 					Capabilities: []*armtestbase.AccountSKUCapability{
		// 						{
		// 							Name: to.Ptr("SLA"),
		// 							Value: to.Ptr("99.9%"),
		// 						},
		// 						{
		// 							Name: to.Ptr("maximumPackageCount"),
		// 							Value: to.Ptr("5"),
		// 						},
		// 						{
		// 							Name: to.Ptr("packageMaximumRunSeconds"),
		// 							Value: to.Ptr("3600"),
		// 					}},
		// 					Tier: to.Ptr(armtestbase.TierStandard),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("contoso-testBaseAccount2"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg2/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount2"),
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armtestbase.AccountResourceProperties{
		// 				AccessLevel: to.Ptr("EarlyAccess"),
		// 				ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
		// 				SKU: &armtestbase.AccountSKU{
		// 					Name: to.Ptr("S0"),
		// 					Capabilities: []*armtestbase.AccountSKUCapability{
		// 						{
		// 							Name: to.Ptr("SLA"),
		// 							Value: to.Ptr("99.999%"),
		// 						},
		// 						{
		// 							Name: to.Ptr("maximumPackageCount"),
		// 							Value: to.Ptr("100"),
		// 						},
		// 						{
		// 							Name: to.Ptr("packageMaximumRunSeconds"),
		// 							Value: to.Ptr("10800"),
		// 					}},
		// 					Tier: to.Ptr(armtestbase.TierStandard),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type AccountsClientBeginCreateOptions added in v0.2.0

type AccountsClientBeginCreateOptions struct {
	// The flag indicating if we would like to restore the Test Base Accounts which were soft deleted before.
	Restore *bool

	// Resumes the LRO from the provided token.
	ResumeToken string
}

AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method.

type AccountsClientBeginDeleteOptions added in v0.2.0

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

AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method.

type AccountsClientBeginOffboardOptions added in v0.2.0

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

AccountsClientBeginOffboardOptions contains the optional parameters for the AccountsClient.BeginOffboard method.

type AccountsClientBeginUpdateOptions added in v0.2.0

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

AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method.

type AccountsClientCheckPackageNameAvailabilityOptions added in v0.2.0

type AccountsClientCheckPackageNameAvailabilityOptions struct {
}

AccountsClientCheckPackageNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckPackageNameAvailability method.

type AccountsClientCheckPackageNameAvailabilityResponse added in v0.2.0

type AccountsClientCheckPackageNameAvailabilityResponse struct {
	// Description of a Check Name availability response properties.
	CheckNameAvailabilityResult
}

AccountsClientCheckPackageNameAvailabilityResponse contains the response from method AccountsClient.CheckPackageNameAvailability.

type AccountsClientCreateResponse added in v0.2.0

type AccountsClientCreateResponse struct {
	// The Test Base Account resource.
	AccountResource
}

AccountsClientCreateResponse contains the response from method AccountsClient.BeginCreate.

type AccountsClientDeleteResponse added in v0.2.0

type AccountsClientDeleteResponse struct {
}

AccountsClientDeleteResponse contains the response from method AccountsClient.BeginDelete.

type AccountsClientGetFileUploadURLOptions added in v0.2.0

type AccountsClientGetFileUploadURLOptions struct {
	// Parameters supplied to the Test Base Account GetFileUploadURL operation.
	Parameters *GetFileUploadURLParameters
}

AccountsClientGetFileUploadURLOptions contains the optional parameters for the AccountsClient.GetFileUploadURL method.

type AccountsClientGetFileUploadURLResponse added in v0.2.0

type AccountsClientGetFileUploadURLResponse struct {
	// The URL response
	FileUploadURLResponse
}

AccountsClientGetFileUploadURLResponse contains the response from method AccountsClient.GetFileUploadURL.

type AccountsClientGetOptions added in v0.2.0

type AccountsClientGetOptions struct {
}

AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.

type AccountsClientGetResponse added in v0.2.0

type AccountsClientGetResponse struct {
	// The Test Base Account resource.
	AccountResource
}

AccountsClientGetResponse contains the response from method AccountsClient.Get.

type AccountsClientListByResourceGroupOptions added in v0.2.0

type AccountsClientListByResourceGroupOptions struct {
	// The flag indicating if we need to include the Test Base Accounts which were soft deleted before.
	GetDeleted *bool
}

AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager method.

type AccountsClientListByResourceGroupResponse added in v0.2.0

type AccountsClientListByResourceGroupResponse struct {
	// A list of Test Base Accounts.
	AccountListResult
}

AccountsClientListByResourceGroupResponse contains the response from method AccountsClient.NewListByResourceGroupPager.

type AccountsClientListBySubscriptionOptions added in v0.2.0

type AccountsClientListBySubscriptionOptions struct {
	// The flag indicating if we need to include the Test Base Accounts which were soft deleted before.
	GetDeleted *bool
}

AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager method.

type AccountsClientListBySubscriptionResponse added in v0.2.0

type AccountsClientListBySubscriptionResponse struct {
	// A list of Test Base Accounts.
	AccountListResult
}

AccountsClientListBySubscriptionResponse contains the response from method AccountsClient.NewListBySubscriptionPager.

type AccountsClientOffboardResponse added in v0.2.0

type AccountsClientOffboardResponse struct {
}

AccountsClientOffboardResponse contains the response from method AccountsClient.BeginOffboard.

type AccountsClientUpdateResponse added in v0.2.0

type AccountsClientUpdateResponse struct {
	// The Test Base Account resource.
	AccountResource
}

AccountsClientUpdateResponse contains the response from method AccountsClient.BeginUpdate.

type Action

type Action string

Action - The action of the command.

const (
	ActionClose     Action = "Close"
	ActionCustom    Action = "Custom"
	ActionInstall   Action = "Install"
	ActionLaunch    Action = "Launch"
	ActionUninstall Action = "Uninstall"
)

func PossibleActionValues

func PossibleActionValues() []Action

PossibleActionValues returns the possible values for the Action const type.

type AnalysisResultListResult

type AnalysisResultListResult struct {
	// The list of Analysis Results.
	Value []*AnalysisResultSingletonResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

AnalysisResultListResult - A list of Analysis Results. It will only contain one element as all the data will be nested in a singleton object.

func (AnalysisResultListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AnalysisResultListResult.

func (*AnalysisResultListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AnalysisResultListResult.

type AnalysisResultName

type AnalysisResultName string
const (
	AnalysisResultNameCPURegression     AnalysisResultName = "cpuRegression"
	AnalysisResultNameCPUUtilization    AnalysisResultName = "cpuUtilization"
	AnalysisResultNameMemoryRegression  AnalysisResultName = "memoryRegression"
	AnalysisResultNameMemoryUtilization AnalysisResultName = "memoryUtilization"
	AnalysisResultNameReliability       AnalysisResultName = "reliability"
	AnalysisResultNameScriptExecution   AnalysisResultName = "scriptExecution"
	AnalysisResultNameTestAnalysis      AnalysisResultName = "testAnalysis"
)

func PossibleAnalysisResultNameValues

func PossibleAnalysisResultNameValues() []AnalysisResultName

PossibleAnalysisResultNameValues returns the possible values for the AnalysisResultName const type.

type AnalysisResultSingletonResource

type AnalysisResultSingletonResource struct {
	// Properties of an Analysis Result.
	Properties AnalysisResultSingletonResourcePropertiesClassification

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

AnalysisResultSingletonResource - The Analysis Result Singleton Resource.

func (AnalysisResultSingletonResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AnalysisResultSingletonResource.

func (*AnalysisResultSingletonResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AnalysisResultSingletonResource.

type AnalysisResultSingletonResourceProperties

type AnalysisResultSingletonResourceProperties struct {
	// REQUIRED; Type of the Analysis Result.
	AnalysisResultType *AnalysisResultType

	// The grade of the test.
	Grade *Grade
}

AnalysisResultSingletonResourceProperties - The properties of Analysis Result resource.

func (*AnalysisResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties

func (a *AnalysisResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties

GetAnalysisResultSingletonResourceProperties implements the AnalysisResultSingletonResourcePropertiesClassification interface for type AnalysisResultSingletonResourceProperties.

func (AnalysisResultSingletonResourceProperties) MarshalJSON added in v0.6.0

MarshalJSON implements the json.Marshaller interface for type AnalysisResultSingletonResourceProperties.

func (*AnalysisResultSingletonResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AnalysisResultSingletonResourceProperties.

type AnalysisResultSingletonResourcePropertiesClassification

type AnalysisResultSingletonResourcePropertiesClassification interface {
	// GetAnalysisResultSingletonResourceProperties returns the AnalysisResultSingletonResourceProperties content of the underlying type.
	GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties
}

AnalysisResultSingletonResourcePropertiesClassification provides polymorphic access to related types. Call the interface's GetAnalysisResultSingletonResourceProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AnalysisResultSingletonResourceProperties, *CPURegressionResultSingletonResourceProperties, *CPUUtilizationResultSingletonResourceProperties, - *MemoryRegressionResultSingletonResourceProperties, *MemoryUtilizationResultSingletonResourceProperties, *ReliabilityResultSingletonResourceProperties, - *ScriptExecutionResultSingletonResourceProperties, *TestAnalysisResultSingletonResourceProperties

type AnalysisResultType

type AnalysisResultType string

AnalysisResultType - Type of the Analysis Result.

const (
	AnalysisResultTypeCPURegression     AnalysisResultType = "CPURegression"
	AnalysisResultTypeCPUUtilization    AnalysisResultType = "CPUUtilization"
	AnalysisResultTypeMemoryRegression  AnalysisResultType = "MemoryRegression"
	AnalysisResultTypeMemoryUtilization AnalysisResultType = "MemoryUtilization"
	AnalysisResultTypeReliability       AnalysisResultType = "Reliability"
	AnalysisResultTypeScriptExecution   AnalysisResultType = "ScriptExecution"
	AnalysisResultTypeTestAnalysis      AnalysisResultType = "TestAnalysis"
)

func PossibleAnalysisResultTypeValues

func PossibleAnalysisResultTypeValues() []AnalysisResultType

PossibleAnalysisResultTypeValues returns the possible values for the AnalysisResultType const type.

type AnalysisResultsClient

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

AnalysisResultsClient contains the methods for the AnalysisResults group. Don't use this type directly, use NewAnalysisResultsClient() instead.

func NewAnalysisResultsClient

func NewAnalysisResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AnalysisResultsClient, error)

NewAnalysisResultsClient creates a new instance of AnalysisResultsClient with the specified values.

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

func (*AnalysisResultsClient) Get

func (client *AnalysisResultsClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, testResultName string, analysisResultName AnalysisResultName, options *AnalysisResultsClientGetOptions) (AnalysisResultsClientGetResponse, error)

Get - Gets an Analysis Result of a Test Result by name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • testResultName - The Test Result Name. It equals to {osName}-{TestResultId} string.
  • analysisResultName - The name of the Analysis Result of a Test Result.
  • options - AnalysisResultsClientGetOptions contains the optional parameters for the AnalysisResultsClient.Get method.
Example (CpuRegressionAnalysisResultGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CPURegressionAnalysisResultGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAnalysisResultsClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-Test-Id", armtestbase.AnalysisResultNameCPURegression, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AnalysisResultSingletonResource = armtestbase.AnalysisResultSingletonResource{
	// 	Name: to.Ptr("cpuRegression"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults/analysisResults"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-Test-Id/analysisResults/cpuRegression"),
	// 	Properties: &armtestbase.CPURegressionResultSingletonResourceProperties{
	// 		AnalysisResultType: to.Ptr(armtestbase.AnalysisResultTypeCPURegression),
	// 		Grade: to.Ptr(armtestbase.GradePass),
	// 		CPURegressionResults: []*armtestbase.RegressionResult{
	// 			{
	// 				Diff: to.Ptr[float64](0.1),
	// 				FileName: to.Ptr("testApp.exe"),
	// 				Grade: to.Ptr(armtestbase.GradePass),
	// 				IsRegressed: to.Ptr(false),
	// 				Details: to.Ptr("Some details of testApp"),
	// 			},
	// 			{
	// 				Diff: to.Ptr[float64](0.15),
	// 				FileName: to.Ptr("dependencies.exe"),
	// 				Grade: to.Ptr(armtestbase.GradePass),
	// 				IsRegressed: to.Ptr(false),
	// 				Details: to.Ptr("Some details of dependencies"),
	// 		}},
	// 	},
	// }
}
Output:

Example (CpuUtilizationAnalysisResultGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CPUUtilizationAnalysisResultGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAnalysisResultsClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-Test-Id", armtestbase.AnalysisResultNameCPUUtilization, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AnalysisResultSingletonResource = armtestbase.AnalysisResultSingletonResource{
	// 	Name: to.Ptr("cpuUtilization"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults/analysisResults"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-Test-Id/analysisResults/cpuUtilization"),
	// 	Properties: &armtestbase.CPUUtilizationResultSingletonResourceProperties{
	// 		AnalysisResultType: to.Ptr(armtestbase.AnalysisResultTypeCPUUtilization),
	// 		Grade: to.Ptr(armtestbase.GradePass),
	// 		CPUUtilizationResults: []*armtestbase.UtilizationResult{
	// 			{
	// 				LowerBound: &armtestbase.UtilizationBound{
	// 					Percentile: to.Ptr[float64](50),
	// 					Value: to.Ptr[float64](20),
	// 				},
	// 				Process: to.Ptr("app.exe"),
	// 				UpperBound: &armtestbase.UtilizationBound{
	// 					Percentile: to.Ptr[float64](90),
	// 					Value: to.Ptr[float64](60),
	// 				},
	// 				Utilization: []*armtestbase.UtilizationEntry{
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](34.7),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:31:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](35.9),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:32:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](27.1),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:33:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](49.8),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:34:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](45.6),
	// 				}},
	// 			},
	// 			{
	// 				LowerBound: &armtestbase.UtilizationBound{
	// 					Percentile: to.Ptr[float64](50),
	// 					Value: to.Ptr[float64](20),
	// 				},
	// 				Process: to.Ptr("anotherProcess.exe"),
	// 				UpperBound: &armtestbase.UtilizationBound{
	// 					Percentile: to.Ptr[float64](90),
	// 					Value: to.Ptr[float64](60),
	// 				},
	// 				Utilization: []*armtestbase.UtilizationEntry{
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](34.7),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:31:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](35.9),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:32:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](27.1),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:33:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](49.8),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:34:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](45.6),
	// 				}},
	// 		}},
	// 	},
	// }
}
Output:

Example (MemoryRegressionAnalysisResultGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/MemoryRegressionAnalysisResultGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAnalysisResultsClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-Test-Id", armtestbase.AnalysisResultNameMemoryRegression, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AnalysisResultSingletonResource = armtestbase.AnalysisResultSingletonResource{
	// 	Name: to.Ptr("memoryRegression"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults/analysisResults"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-Test-Id/analysisResults/memoryRegression"),
	// 	Properties: &armtestbase.MemoryRegressionResultSingletonResourceProperties{
	// 		AnalysisResultType: to.Ptr(armtestbase.AnalysisResultTypeMemoryRegression),
	// 		Grade: to.Ptr(armtestbase.GradePass),
	// 		MemoryRegressionResults: []*armtestbase.RegressionResult{
	// 			{
	// 				Diff: to.Ptr[float64](0.1),
	// 				FileName: to.Ptr("testApp.exe"),
	// 				Grade: to.Ptr(armtestbase.GradePass),
	// 				IsRegressed: to.Ptr(false),
	// 				Details: to.Ptr("Some details of testApp"),
	// 			},
	// 			{
	// 				Diff: to.Ptr[float64](0.15),
	// 				FileName: to.Ptr("dependencies.exe"),
	// 				Grade: to.Ptr(armtestbase.GradePass),
	// 				IsRegressed: to.Ptr(false),
	// 				Details: to.Ptr("Some details of dependencies"),
	// 		}},
	// 	},
	// }
}
Output:

Example (MemoryUtilizationAnalysisResultGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/MemoryUtilizationAnalysisResultGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAnalysisResultsClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-Test-Id", armtestbase.AnalysisResultNameMemoryUtilization, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AnalysisResultSingletonResource = armtestbase.AnalysisResultSingletonResource{
	// 	Name: to.Ptr("memoryUtilization"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults/analysisResults"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-Test-Id/analysisResults/memoryUtilization"),
	// 	Properties: &armtestbase.MemoryUtilizationResultSingletonResourceProperties{
	// 		AnalysisResultType: to.Ptr(armtestbase.AnalysisResultTypeMemoryUtilization),
	// 		Grade: to.Ptr(armtestbase.GradePass),
	// 		MemoryUtilizationResults: []*armtestbase.UtilizationResult{
	// 			{
	// 				LowerBound: &armtestbase.UtilizationBound{
	// 					Percentile: to.Ptr[float64](50),
	// 					Value: to.Ptr[float64](20),
	// 				},
	// 				Process: to.Ptr("app.exe"),
	// 				UpperBound: &armtestbase.UtilizationBound{
	// 					Percentile: to.Ptr[float64](90),
	// 					Value: to.Ptr[float64](60),
	// 				},
	// 				Utilization: []*armtestbase.UtilizationEntry{
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](34.7),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:31:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](35.9),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:32:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](27.1),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:33:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](49.8),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:34:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](45.6),
	// 				}},
	// 			},
	// 			{
	// 				LowerBound: &armtestbase.UtilizationBound{
	// 					Percentile: to.Ptr[float64](50),
	// 					Value: to.Ptr[float64](20),
	// 				},
	// 				Process: to.Ptr("anotherProcess.exe"),
	// 				UpperBound: &armtestbase.UtilizationBound{
	// 					Percentile: to.Ptr[float64](90),
	// 					Value: to.Ptr[float64](60),
	// 				},
	// 				Utilization: []*armtestbase.UtilizationEntry{
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](34.7),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:31:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](35.9),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:32:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](27.1),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:33:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](49.8),
	// 					},
	// 					{
	// 						Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:34:00.000Z"); return t}()),
	// 						Value: to.Ptr[float64](45.6),
	// 				}},
	// 		}},
	// 	},
	// }
}
Output:

func (*AnalysisResultsClient) NewListPager added in v0.4.0

func (client *AnalysisResultsClient) NewListPager(resourceGroupName string, testBaseAccountName string, packageName string, testResultName string, analysisResultType AnalysisResultType, options *AnalysisResultsClientListOptions) *runtime.Pager[AnalysisResultsClientListResponse]

NewListPager - Lists the Analysis Results of a Test Result. The result collection will only contain one element as all the data will be nested in a singleton object.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • testResultName - The Test Result Name. It equals to {osName}-{TestResultId} string.
  • analysisResultType - The type of the Analysis Result of a Test Result.
  • options - AnalysisResultsClientListOptions contains the optional parameters for the AnalysisResultsClient.NewListPager method.
Example (CpuRegressionAnalysisResultsList)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CPURegressionAnalysisResultsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAnalysisResultsClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-Test-Id", armtestbase.AnalysisResultTypeCPURegression, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AnalysisResultListResult = armtestbase.AnalysisResultListResult{
		// 	Value: []*armtestbase.AnalysisResultSingletonResource{
		// 		{
		// 			Name: to.Ptr("cpuRegression"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults/analysisResults"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-Test-Id/analysisResults/cpuRegression"),
		// 			Properties: &armtestbase.CPURegressionResultSingletonResourceProperties{
		// 				AnalysisResultType: to.Ptr(armtestbase.AnalysisResultTypeCPURegression),
		// 				Grade: to.Ptr(armtestbase.GradePass),
		// 				CPURegressionResults: []*armtestbase.RegressionResult{
		// 					{
		// 						Diff: to.Ptr[float64](0.1),
		// 						FileName: to.Ptr("testApp.exe"),
		// 						Grade: to.Ptr(armtestbase.GradePass),
		// 						IsRegressed: to.Ptr(false),
		// 						Details: to.Ptr("Some details of testApp"),
		// 					},
		// 					{
		// 						Diff: to.Ptr[float64](0.15),
		// 						FileName: to.Ptr("dependencies.exe"),
		// 						Grade: to.Ptr(armtestbase.GradePass),
		// 						IsRegressed: to.Ptr(false),
		// 						Details: to.Ptr("Some details of dependencies"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (CpuUtilizationAnalysisResultsList)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CPUUtilizationAnalysisResultsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAnalysisResultsClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-Test-Id", armtestbase.AnalysisResultTypeCPUUtilization, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AnalysisResultListResult = armtestbase.AnalysisResultListResult{
		// 	Value: []*armtestbase.AnalysisResultSingletonResource{
		// 		{
		// 			Name: to.Ptr("cpuUtilization"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults/analysisResults"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-Test-Id/analysisResults/cpuUtilization"),
		// 			Properties: &armtestbase.CPUUtilizationResultSingletonResourceProperties{
		// 				AnalysisResultType: to.Ptr(armtestbase.AnalysisResultTypeCPUUtilization),
		// 				Grade: to.Ptr(armtestbase.GradePass),
		// 				CPUUtilizationResults: []*armtestbase.UtilizationResult{
		// 					{
		// 						LowerBound: &armtestbase.UtilizationBound{
		// 							Percentile: to.Ptr[float64](50),
		// 							Value: to.Ptr[float64](20),
		// 						},
		// 						Process: to.Ptr("app.exe"),
		// 						UpperBound: &armtestbase.UtilizationBound{
		// 							Percentile: to.Ptr[float64](90),
		// 							Value: to.Ptr[float64](60),
		// 						},
		// 						Utilization: []*armtestbase.UtilizationEntry{
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](34.7),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:31:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](35.9),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:32:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](27.1),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:33:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](49.8),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:34:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](45.6),
		// 						}},
		// 					},
		// 					{
		// 						LowerBound: &armtestbase.UtilizationBound{
		// 							Percentile: to.Ptr[float64](50),
		// 							Value: to.Ptr[float64](20),
		// 						},
		// 						Process: to.Ptr("anotherProcess.exe"),
		// 						UpperBound: &armtestbase.UtilizationBound{
		// 							Percentile: to.Ptr[float64](90),
		// 							Value: to.Ptr[float64](60),
		// 						},
		// 						Utilization: []*armtestbase.UtilizationEntry{
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](34.7),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:31:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](35.9),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:32:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](27.1),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:33:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](49.8),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:34:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](45.6),
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (MemoryRegressionAnalysisResultsList)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/MemoryRegressionAnalysisResultsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAnalysisResultsClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-Test-Id", armtestbase.AnalysisResultTypeMemoryRegression, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AnalysisResultListResult = armtestbase.AnalysisResultListResult{
		// 	Value: []*armtestbase.AnalysisResultSingletonResource{
		// 		{
		// 			Name: to.Ptr("memoryRegression"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults/analysisResults"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-Test-Id/analysisResults/memoryRegression"),
		// 			Properties: &armtestbase.MemoryRegressionResultSingletonResourceProperties{
		// 				AnalysisResultType: to.Ptr(armtestbase.AnalysisResultTypeMemoryRegression),
		// 				Grade: to.Ptr(armtestbase.GradePass),
		// 				MemoryRegressionResults: []*armtestbase.RegressionResult{
		// 					{
		// 						Diff: to.Ptr[float64](0.1),
		// 						FileName: to.Ptr("testApp.exe"),
		// 						Grade: to.Ptr(armtestbase.GradePass),
		// 						IsRegressed: to.Ptr(false),
		// 						Details: to.Ptr("Some details of testApp"),
		// 					},
		// 					{
		// 						Diff: to.Ptr[float64](0.15),
		// 						FileName: to.Ptr("dependencies.exe"),
		// 						Grade: to.Ptr(armtestbase.GradePass),
		// 						IsRegressed: to.Ptr(false),
		// 						Details: to.Ptr("Some details of dependencies"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (MemoryUtilizationAnalysisResultsList)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/MemoryUtilizationAnalysisResultsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAnalysisResultsClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-Test-Id", armtestbase.AnalysisResultTypeMemoryUtilization, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AnalysisResultListResult = armtestbase.AnalysisResultListResult{
		// 	Value: []*armtestbase.AnalysisResultSingletonResource{
		// 		{
		// 			Name: to.Ptr("cpuUtilization"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults/analysisResults"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-Test-Id/analysisResults/memoryUtilization"),
		// 			Properties: &armtestbase.MemoryUtilizationResultSingletonResourceProperties{
		// 				AnalysisResultType: to.Ptr(armtestbase.AnalysisResultTypeMemoryUtilization),
		// 				Grade: to.Ptr(armtestbase.GradePass),
		// 				MemoryUtilizationResults: []*armtestbase.UtilizationResult{
		// 					{
		// 						LowerBound: &armtestbase.UtilizationBound{
		// 							Percentile: to.Ptr[float64](50),
		// 							Value: to.Ptr[float64](20),
		// 						},
		// 						Process: to.Ptr("app.exe"),
		// 						UpperBound: &armtestbase.UtilizationBound{
		// 							Percentile: to.Ptr[float64](90),
		// 							Value: to.Ptr[float64](60),
		// 						},
		// 						Utilization: []*armtestbase.UtilizationEntry{
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](34.7),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:31:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](35.9),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:32:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](27.1),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:33:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](49.8),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:34:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](45.6),
		// 						}},
		// 					},
		// 					{
		// 						LowerBound: &armtestbase.UtilizationBound{
		// 							Percentile: to.Ptr[float64](50),
		// 							Value: to.Ptr[float64](20),
		// 						},
		// 						Process: to.Ptr("anotherProcess.exe"),
		// 						UpperBound: &armtestbase.UtilizationBound{
		// 							Percentile: to.Ptr[float64](90),
		// 							Value: to.Ptr[float64](60),
		// 						},
		// 						Utilization: []*armtestbase.UtilizationEntry{
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](34.7),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:31:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](35.9),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:32:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](27.1),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:33:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](49.8),
		// 							},
		// 							{
		// 								Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:34:00.000Z"); return t}()),
		// 								Value: to.Ptr[float64](45.6),
		// 						}},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type AnalysisResultsClientGetOptions added in v0.2.0

type AnalysisResultsClientGetOptions struct {
}

AnalysisResultsClientGetOptions contains the optional parameters for the AnalysisResultsClient.Get method.

type AnalysisResultsClientGetResponse added in v0.2.0

type AnalysisResultsClientGetResponse struct {
	// The Analysis Result Singleton Resource.
	AnalysisResultSingletonResource
}

AnalysisResultsClientGetResponse contains the response from method AnalysisResultsClient.Get.

type AnalysisResultsClientListOptions added in v0.2.0

type AnalysisResultsClientListOptions struct {
}

AnalysisResultsClientListOptions contains the optional parameters for the AnalysisResultsClient.NewListPager method.

type AnalysisResultsClientListResponse added in v0.2.0

type AnalysisResultsClientListResponse struct {
	// A list of Analysis Results. It will only contain one element as all the data will be nested in a singleton object.
	AnalysisResultListResult
}

AnalysisResultsClientListResponse contains the response from method AnalysisResultsClient.NewListPager.

type AnalysisStatus

type AnalysisStatus string

AnalysisStatus - The analysis status.

const (
	AnalysisStatusAvailable    AnalysisStatus = "Available"
	AnalysisStatusCompleted    AnalysisStatus = "Completed"
	AnalysisStatusFailed       AnalysisStatus = "Failed"
	AnalysisStatusInProgress   AnalysisStatus = "InProgress"
	AnalysisStatusNone         AnalysisStatus = "None"
	AnalysisStatusNotAvailable AnalysisStatus = "NotAvailable"
	AnalysisStatusSucceeded    AnalysisStatus = "Succeeded"
)

func PossibleAnalysisStatusValues

func PossibleAnalysisStatusValues() []AnalysisStatus

PossibleAnalysisStatusValues returns the possible values for the AnalysisStatus const type.

type AvailableOSClient

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

AvailableOSClient contains the methods for the AvailableOS group. Don't use this type directly, use NewAvailableOSClient() instead.

func NewAvailableOSClient

func NewAvailableOSClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableOSClient, error)

NewAvailableOSClient creates a new instance of AvailableOSClient with the specified values.

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

func (*AvailableOSClient) Get

func (client *AvailableOSClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, availableOSResourceName string, options *AvailableOSClientGetOptions) (AvailableOSClientGetResponse, error)

Get - Gets an available OS to run a package under a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • availableOSResourceName - The resource name of an Available OS.
  • options - AvailableOSClientGetOptions contains the optional parameters for the AvailableOSClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/AvailableOSGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAvailableOSClient().Get(ctx, "contoso-rg", "contoso-testBaseAccount", "Windows-10-2004", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AvailableOSResource = armtestbase.AvailableOSResource{
	// 	Name: to.Ptr("Windows-10-2004"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/availableOSs"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/availableOSs/Windows-10-2004"),
	// 	Properties: &armtestbase.AvailableOSProperties{
	// 		InsiderChannel: to.Ptr("Channel 1"),
	// 		OSID: to.Ptr("Windows 10 2004"),
	// 		OSName: to.Ptr("Windows 10 2004"),
	// 		OSPlatform: to.Ptr("Client"),
	// 		OSUpdateType: to.Ptr("Feature update"),
	// 		OSVersion: to.Ptr("Windows 10"),
	// 	},
	// }
}
Output:

func (*AvailableOSClient) NewListPager added in v0.4.0

func (client *AvailableOSClient) NewListPager(resourceGroupName string, testBaseAccountName string, osUpdateType OsUpdateType, options *AvailableOSClientListOptions) *runtime.Pager[AvailableOSClientListResponse]

NewListPager - Lists all the available OSs to run a package under a Test Base Account.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • osUpdateType - The type of the OS Update.
  • options - AvailableOSClientListOptions contains the optional parameters for the AvailableOSClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/AvailableOSsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAvailableOSClient().NewListPager("contoso-rg", "contoso-testBaseAccount", armtestbase.OsUpdateTypeSecurityUpdate, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AvailableOSListResult = armtestbase.AvailableOSListResult{
		// 	Value: []*armtestbase.AvailableOSResource{
		// 		{
		// 			Name: to.Ptr("Windows-10-2004"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/availableOSs"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/availableOSs/Windows-10-2004"),
		// 			Properties: &armtestbase.AvailableOSProperties{
		// 				InsiderChannel: to.Ptr("Channel 1"),
		// 				OSID: to.Ptr("Windows 10 2004"),
		// 				OSName: to.Ptr("Windows 10 2004"),
		// 				OSPlatform: to.Ptr("Client"),
		// 				OSUpdateType: to.Ptr("Feature update"),
		// 				OSVersion: to.Ptr("Windows 10"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Windows-10-1909"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/availableOSs"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/availableOSs/Windows-10-1909"),
		// 			Properties: &armtestbase.AvailableOSProperties{
		// 				OSID: to.Ptr("Windows 10 1909"),
		// 				OSName: to.Ptr("Windows 10 1909"),
		// 				OSPlatform: to.Ptr("Client"),
		// 				OSUpdateType: to.Ptr("Security update"),
		// 				OSVersion: to.Ptr("Windows 10"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Windows-10-1903"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/availableOSs"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/availableOSs/Windows-10-1903"),
		// 			Properties: &armtestbase.AvailableOSProperties{
		// 				OSID: to.Ptr("Windows 10 1903"),
		// 				OSName: to.Ptr("Windows 10 1903"),
		// 				OSPlatform: to.Ptr("Client"),
		// 				OSUpdateType: to.Ptr("Security update"),
		// 				OSVersion: to.Ptr("Windows 10"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Windows-10-1809"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/availableOSs"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/availableOSs/Windows-10-1809"),
		// 			Properties: &armtestbase.AvailableOSProperties{
		// 				InsiderChannel: to.Ptr("Channel 3"),
		// 				OSID: to.Ptr("Windows 10 1809"),
		// 				OSName: to.Ptr("Windows 10 1809"),
		// 				OSPlatform: to.Ptr("Client"),
		// 				OSUpdateType: to.Ptr("Feature update"),
		// 				OSVersion: to.Ptr("Windows 10"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Windows-Server-2016"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/availableOSs"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/availableOSs/Windows-Server-2016"),
		// 			Properties: &armtestbase.AvailableOSProperties{
		// 				OSID: to.Ptr("Windows Server 2016"),
		// 				OSName: to.Ptr("Windows Server 2016"),
		// 				OSPlatform: to.Ptr("Server"),
		// 				OSUpdateType: to.Ptr("Security update"),
		// 				OSVersion: to.Ptr("Windows Server 2016"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type AvailableOSClientGetOptions added in v0.2.0

type AvailableOSClientGetOptions struct {
}

AvailableOSClientGetOptions contains the optional parameters for the AvailableOSClient.Get method.

type AvailableOSClientGetResponse added in v0.2.0

type AvailableOSClientGetResponse struct {
	// The Available OS resource.
	AvailableOSResource
}

AvailableOSClientGetResponse contains the response from method AvailableOSClient.Get.

type AvailableOSClientListOptions added in v0.2.0

type AvailableOSClientListOptions struct {
}

AvailableOSClientListOptions contains the optional parameters for the AvailableOSClient.NewListPager method.

type AvailableOSClientListResponse added in v0.2.0

type AvailableOSClientListResponse struct {
	// A list of available OSs.
	AvailableOSListResult
}

AvailableOSClientListResponse contains the response from method AvailableOSClient.NewListPager.

type AvailableOSListResult

type AvailableOSListResult struct {
	// The list of available OSs.
	Value []*AvailableOSResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

AvailableOSListResult - A list of available OSs.

func (AvailableOSListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AvailableOSListResult.

func (*AvailableOSListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOSListResult.

type AvailableOSProperties

type AvailableOSProperties struct {
	// The insider channel of an Available OS of a Test Base Account.
	InsiderChannel *string

	// The Id of an Available OS of a Test Base Account.
	OSID *string

	// The name of an Available OS of a Test Base Account.
	OSName *string

	// The Platform of an Available OS of a Test Base Account.
	OSPlatform *string

	// The OS update type of an Available OS of a Test Base Account.
	OSUpdateType *string

	// The version of an Available OS of a Test Base Account.
	OSVersion *string
}

AvailableOSProperties - The Available OS properties.

func (AvailableOSProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type AvailableOSProperties.

func (*AvailableOSProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOSProperties.

type AvailableOSResource

type AvailableOSResource struct {
	// Available OS properties.
	Properties *AvailableOSProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

AvailableOSResource - The Available OS resource.

func (AvailableOSResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AvailableOSResource.

func (*AvailableOSResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOSResource.

type CPURegressionResultSingletonResourceProperties

type CPURegressionResultSingletonResourceProperties struct {
	// REQUIRED; Type of the Analysis Result.
	AnalysisResultType *AnalysisResultType

	// The result array data.
	CPURegressionResults []*RegressionResult

	// The grade of the test.
	Grade *Grade
}

CPURegressionResultSingletonResourceProperties - The properties of CPU Regression Result.

func (*CPURegressionResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties added in v0.2.0

func (c *CPURegressionResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties

GetAnalysisResultSingletonResourceProperties implements the AnalysisResultSingletonResourcePropertiesClassification interface for type CPURegressionResultSingletonResourceProperties.

func (CPURegressionResultSingletonResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type CPURegressionResultSingletonResourceProperties.

func (*CPURegressionResultSingletonResourceProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type CPURegressionResultSingletonResourceProperties.

type CPUUtilizationResultSingletonResourceProperties

type CPUUtilizationResultSingletonResourceProperties struct {
	// REQUIRED; Type of the Analysis Result.
	AnalysisResultType *AnalysisResultType

	// The result array data.
	CPUUtilizationResults []*UtilizationResult

	// The grade of the test.
	Grade *Grade
}

CPUUtilizationResultSingletonResourceProperties - The properties of CPU Utilization Result.

func (*CPUUtilizationResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties added in v0.2.0

func (c *CPUUtilizationResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties

GetAnalysisResultSingletonResourceProperties implements the AnalysisResultSingletonResourcePropertiesClassification interface for type CPUUtilizationResultSingletonResourceProperties.

func (CPUUtilizationResultSingletonResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type CPUUtilizationResultSingletonResourceProperties.

func (*CPUUtilizationResultSingletonResourceProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type CPUUtilizationResultSingletonResourceProperties.

type Category

type Category string

Category - The category of the failure.

const (
	CategoryInfrastructure Category = "Infrastructure"
	CategoryNone           Category = "None"
	CategoryOSUpdate       Category = "OSUpdate"
	CategoryPackage        Category = "Package"
	CategoryUnidentified   Category = "Unidentified"
)

func PossibleCategoryValues

func PossibleCategoryValues() []Category

PossibleCategoryValues returns the possible values for the Category const type.

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	// Value indicating the availability of the name: true if the name is available; otherwise, false.
	NameAvailable *bool

	// The reason for unavailability of a name. Required if nameAvailable == false.
	Reason *Reason

	// READ-ONLY; The detailed info regarding the reason associated with the name. Required if nameAvailable == false.
	Message *string
}

CheckNameAvailabilityResult - Description of a Check Name availability response properties.

func (CheckNameAvailabilityResult) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.

func (*CheckNameAvailabilityResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.

type ClientFactory added in v0.6.0

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

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

func NewClientFactory added in v0.6.0

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

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

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

func (*ClientFactory) NewAccountsClient added in v0.6.0

func (c *ClientFactory) NewAccountsClient() *AccountsClient

NewAccountsClient creates a new instance of AccountsClient.

func (*ClientFactory) NewAnalysisResultsClient added in v0.6.0

func (c *ClientFactory) NewAnalysisResultsClient() *AnalysisResultsClient

NewAnalysisResultsClient creates a new instance of AnalysisResultsClient.

func (*ClientFactory) NewAvailableOSClient added in v0.6.0

func (c *ClientFactory) NewAvailableOSClient() *AvailableOSClient

NewAvailableOSClient creates a new instance of AvailableOSClient.

func (*ClientFactory) NewCustomerEventsClient added in v0.6.0

func (c *ClientFactory) NewCustomerEventsClient() *CustomerEventsClient

NewCustomerEventsClient creates a new instance of CustomerEventsClient.

func (*ClientFactory) NewEmailEventsClient added in v0.6.0

func (c *ClientFactory) NewEmailEventsClient() *EmailEventsClient

NewEmailEventsClient creates a new instance of EmailEventsClient.

func (*ClientFactory) NewFavoriteProcessesClient added in v0.6.0

func (c *ClientFactory) NewFavoriteProcessesClient() *FavoriteProcessesClient

NewFavoriteProcessesClient creates a new instance of FavoriteProcessesClient.

func (*ClientFactory) NewFlightingRingsClient added in v0.6.0

func (c *ClientFactory) NewFlightingRingsClient() *FlightingRingsClient

NewFlightingRingsClient creates a new instance of FlightingRingsClient.

func (*ClientFactory) NewOSUpdatesClient added in v0.6.0

func (c *ClientFactory) NewOSUpdatesClient() *OSUpdatesClient

NewOSUpdatesClient creates a new instance of OSUpdatesClient.

func (*ClientFactory) NewOperationsClient added in v0.6.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPackagesClient added in v0.6.0

func (c *ClientFactory) NewPackagesClient() *PackagesClient

NewPackagesClient creates a new instance of PackagesClient.

func (*ClientFactory) NewSKUsClient added in v0.6.0

func (c *ClientFactory) NewSKUsClient() *SKUsClient

NewSKUsClient creates a new instance of SKUsClient.

func (*ClientFactory) NewTestResultsClient added in v0.6.0

func (c *ClientFactory) NewTestResultsClient() *TestResultsClient

NewTestResultsClient creates a new instance of TestResultsClient.

func (*ClientFactory) NewTestSummariesClient added in v0.6.0

func (c *ClientFactory) NewTestSummariesClient() *TestSummariesClient

NewTestSummariesClient creates a new instance of TestSummariesClient.

func (*ClientFactory) NewTestTypesClient added in v0.6.0

func (c *ClientFactory) NewTestTypesClient() *TestTypesClient

NewTestTypesClient creates a new instance of TestTypesClient.

func (*ClientFactory) NewUsageClient added in v0.6.0

func (c *ClientFactory) NewUsageClient() *UsageClient

NewUsageClient creates a new instance of UsageClient.

type Command

type Command struct {
	// REQUIRED; The action of the command.
	Action *Action

	// REQUIRED; The content of the command. The content depends on source type.
	Content *string

	// REQUIRED; The type of command content.
	ContentType *ContentType

	// REQUIRED; The name of the command.
	Name *string

	// Specifies whether to run the command even if a previous command is failed.
	AlwaysRun *bool

	// Specifies whether to apply update before the command.
	ApplyUpdateBefore *bool

	// Specifies the max run time of the command.
	MaxRunTime *int32

	// Specifies whether to restart the VM after the command executed.
	RestartAfter *bool

	// Specifies whether to run the command in interactive mode.
	RunAsInteractive *bool

	// Specifies whether to run the command as administrator.
	RunElevated *bool
}

Command - The command used in the test

func (Command) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type Command.

func (*Command) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Command.

type ContentType

type ContentType string

ContentType - The type of command content.

const (
	ContentTypeFile   ContentType = "File"
	ContentTypeInline ContentType = "Inline"
	ContentTypePath   ContentType = "Path"
)

func PossibleContentTypeValues

func PossibleContentTypeValues() []ContentType

PossibleContentTypeValues returns the possible values for the ContentType const type.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

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

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CustomerEventListResult

type CustomerEventListResult struct {
	// The list of Test Base Customer Events.
	Value []*CustomerEventResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

CustomerEventListResult - A list of Test Base Customer Events.

func (CustomerEventListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomerEventListResult.

func (*CustomerEventListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomerEventListResult.

type CustomerEventProperties

type CustomerEventProperties struct {
	// REQUIRED; The name of the event subscribed to.
	EventName *string

	// REQUIRED; The notification event receivers.
	Receivers []*NotificationEventReceiver
}

CustomerEventProperties - A notification events subscribed to be received by customer.

func (CustomerEventProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomerEventProperties.

func (*CustomerEventProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomerEventProperties.

type CustomerEventResource

type CustomerEventResource struct {
	// Customer Notification Event properties.
	Properties *CustomerEventProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

CustomerEventResource - The Customer Notification Event resource.

func (CustomerEventResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomerEventResource.

func (*CustomerEventResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomerEventResource.

type CustomerEventsClient

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

CustomerEventsClient contains the methods for the CustomerEvents group. Don't use this type directly, use NewCustomerEventsClient() instead.

func NewCustomerEventsClient

func NewCustomerEventsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomerEventsClient, error)

NewCustomerEventsClient creates a new instance of CustomerEventsClient with the specified values.

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

func (*CustomerEventsClient) BeginCreate

func (client *CustomerEventsClient) BeginCreate(ctx context.Context, resourceGroupName string, testBaseAccountName string, customerEventName string, parameters CustomerEventResource, options *CustomerEventsClientBeginCreateOptions) (*runtime.Poller[CustomerEventsClientCreateResponse], error)

BeginCreate - Create or replace a Test Base Customer Event. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • customerEventName - The resource name of the Test Base Customer event.
  • parameters - Parameters supplied to create a Test Base CustomerEvent.
  • options - CustomerEventsClientBeginCreateOptions contains the optional parameters for the CustomerEventsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CustomerEventCreate.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomerEventsClient().BeginCreate(ctx, "contoso-rg1", "contoso-testBaseAccount1", "WeeklySummary", armtestbase.CustomerEventResource{
		Properties: &armtestbase.CustomerEventProperties{
			EventName: to.Ptr("WeeklySummary"),
			Receivers: []*armtestbase.NotificationEventReceiver{
				{
					ReceiverType: to.Ptr("UserObjects"),
					ReceiverValue: &armtestbase.NotificationReceiverValue{
						UserObjectReceiverValue: &armtestbase.UserObjectReceiverValue{
							UserObjectIDs: []*string{
								to.Ptr("245245245245325"),
								to.Ptr("365365365363565")},
						},
					},
				},
				{
					ReceiverType: to.Ptr("DistributionGroup"),
					ReceiverValue: &armtestbase.NotificationReceiverValue{
						DistributionGroupListReceiverValue: &armtestbase.DistributionGroupListReceiverValue{
							DistributionGroups: []*string{
								to.Ptr("test@microsoft.com")},
						},
					},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomerEventResource = armtestbase.CustomerEventResource{
	// 	Name: to.Ptr("WeeklySummary"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/customerEvents"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/customerEvents/WeeklySummary"),
	// 	Properties: &armtestbase.CustomerEventProperties{
	// 		EventName: to.Ptr("WeeklySummary"),
	// 		Receivers: []*armtestbase.NotificationEventReceiver{
	// 			{
	// 				ReceiverType: to.Ptr("UserObjects"),
	// 				ReceiverValue: &armtestbase.NotificationReceiverValue{
	// 					UserObjectReceiverValue: &armtestbase.UserObjectReceiverValue{
	// 						UserObjectIDs: []*string{
	// 							to.Ptr("245245245245325"),
	// 							to.Ptr("365365365363565")},
	// 						},
	// 					},
	// 				},
	// 				{
	// 					ReceiverType: to.Ptr("DistributionGroup"),
	// 					ReceiverValue: &armtestbase.NotificationReceiverValue{
	// 						DistributionGroupListReceiverValue: &armtestbase.DistributionGroupListReceiverValue{
	// 							DistributionGroups: []*string{
	// 								to.Ptr("test@microsoft.com")},
	// 							},
	// 						},
	// 				}},
	// 			},
	// 		}
}
Output:

func (*CustomerEventsClient) BeginDelete

func (client *CustomerEventsClient) BeginDelete(ctx context.Context, resourceGroupName string, testBaseAccountName string, customerEventName string, options *CustomerEventsClientBeginDeleteOptions) (*runtime.Poller[CustomerEventsClientDeleteResponse], error)

BeginDelete - Deletes a Test Base Customer Event. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • customerEventName - The resource name of the Test Base Customer event.
  • options - CustomerEventsClientBeginDeleteOptions contains the optional parameters for the CustomerEventsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CustomerEventDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomerEventsClient().BeginDelete(ctx, "contoso-rg1", "contoso-testBaseAccount1", "WeeklySummary", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CustomerEventsClient) Get

func (client *CustomerEventsClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, customerEventName string, options *CustomerEventsClientGetOptions) (CustomerEventsClientGetResponse, error)

Get - Gets a Test Base CustomerEvent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • customerEventName - The resource name of the Test Base Customer event.
  • options - CustomerEventsClientGetOptions contains the optional parameters for the CustomerEventsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CustomerEventGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomerEventsClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "WeeklySummary", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CustomerEventResource = armtestbase.CustomerEventResource{
	// 	Name: to.Ptr("WeeklySummary"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/customerEvents"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/customerEvents/WeeklySummary"),
	// 	Properties: &armtestbase.CustomerEventProperties{
	// 		EventName: to.Ptr("WeeklySummary"),
	// 		Receivers: []*armtestbase.NotificationEventReceiver{
	// 			{
	// 				ReceiverType: to.Ptr("UserObjects"),
	// 				ReceiverValue: &armtestbase.NotificationReceiverValue{
	// 					UserObjectReceiverValue: &armtestbase.UserObjectReceiverValue{
	// 						UserObjectIDs: []*string{
	// 							to.Ptr("245245245245325"),
	// 							to.Ptr("365365365363565")},
	// 						},
	// 					},
	// 				},
	// 				{
	// 					ReceiverType: to.Ptr("SubscriptionRole"),
	// 					ReceiverValue: &armtestbase.NotificationReceiverValue{
	// 						SubscriptionReceiverValue: &armtestbase.SubscriptionReceiverValue{
	// 							Role: to.Ptr("Contributor"),
	// 							SubscriptionID: to.Ptr("test-subscription-id"),
	// 							SubscriptionName: to.Ptr("test-subscription"),
	// 						},
	// 					},
	// 				},
	// 				{
	// 					ReceiverType: to.Ptr("DistributionGroup"),
	// 					ReceiverValue: &armtestbase.NotificationReceiverValue{
	// 						DistributionGroupListReceiverValue: &armtestbase.DistributionGroupListReceiverValue{
	// 							DistributionGroups: []*string{
	// 								to.Ptr("test@microsoft.com")},
	// 							},
	// 						},
	// 				}},
	// 			},
	// 		}
}
Output:

func (*CustomerEventsClient) NewListByTestBaseAccountPager added in v0.4.0

func (client *CustomerEventsClient) NewListByTestBaseAccountPager(resourceGroupName string, testBaseAccountName string, options *CustomerEventsClientListByTestBaseAccountOptions) *runtime.Pager[CustomerEventsClientListByTestBaseAccountResponse]

NewListByTestBaseAccountPager - Lists all notification events subscribed under a Test Base Account.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - CustomerEventsClientListByTestBaseAccountOptions contains the optional parameters for the CustomerEventsClient.NewListByTestBaseAccountPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/CustomerEventsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomerEventsClient().NewListByTestBaseAccountPager("contoso-rg1", "contoso-testBaseAccount1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CustomerEventListResult = armtestbase.CustomerEventListResult{
		// 	Value: []*armtestbase.CustomerEventResource{
		// 		{
		// 			Name: to.Ptr("ExecutionFailure"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/customerEvents"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/customerEvents/ExecutionFailure"),
		// 			Properties: &armtestbase.CustomerEventProperties{
		// 				EventName: to.Ptr("ExecutionFailure"),
		// 				Receivers: []*armtestbase.NotificationEventReceiver{
		// 					{
		// 						ReceiverType: to.Ptr("SubscriptionRole"),
		// 						ReceiverValue: &armtestbase.NotificationReceiverValue{
		// 							SubscriptionReceiverValue: &armtestbase.SubscriptionReceiverValue{
		// 								Role: to.Ptr("Contributor"),
		// 								SubscriptionID: to.Ptr("test-subscription-id"),
		// 								SubscriptionName: to.Ptr("test-subscription"),
		// 							},
		// 						},
		// 					},
		// 					{
		// 						ReceiverType: to.Ptr("DistributionGroup"),
		// 						ReceiverValue: &armtestbase.NotificationReceiverValue{
		// 							DistributionGroupListReceiverValue: &armtestbase.DistributionGroupListReceiverValue{
		// 								DistributionGroups: []*string{
		// 									to.Ptr("test@microsoft.com")},
		// 								},
		// 							},
		// 					}},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("WeeklySummary"),
		// 				Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/customerEvents"),
		// 				ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/customerEvents/WeeklySummary"),
		// 				Properties: &armtestbase.CustomerEventProperties{
		// 					EventName: to.Ptr("WeeklySummary"),
		// 					Receivers: []*armtestbase.NotificationEventReceiver{
		// 						{
		// 							ReceiverType: to.Ptr("UserObjects"),
		// 							ReceiverValue: &armtestbase.NotificationReceiverValue{
		// 								UserObjectReceiverValue: &armtestbase.UserObjectReceiverValue{
		// 									UserObjectIDs: []*string{
		// 										to.Ptr("245245245245325"),
		// 										to.Ptr("365365365363565")},
		// 									},
		// 								},
		// 						}},
		// 					},
		// 			}},
		// 		}
	}
}
Output:

type CustomerEventsClientBeginCreateOptions added in v0.2.0

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

CustomerEventsClientBeginCreateOptions contains the optional parameters for the CustomerEventsClient.BeginCreate method.

type CustomerEventsClientBeginDeleteOptions added in v0.2.0

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

CustomerEventsClientBeginDeleteOptions contains the optional parameters for the CustomerEventsClient.BeginDelete method.

type CustomerEventsClientCreateResponse added in v0.2.0

type CustomerEventsClientCreateResponse struct {
	// The Customer Notification Event resource.
	CustomerEventResource
}

CustomerEventsClientCreateResponse contains the response from method CustomerEventsClient.BeginCreate.

type CustomerEventsClientDeleteResponse added in v0.2.0

type CustomerEventsClientDeleteResponse struct {
}

CustomerEventsClientDeleteResponse contains the response from method CustomerEventsClient.BeginDelete.

type CustomerEventsClientGetOptions added in v0.2.0

type CustomerEventsClientGetOptions struct {
}

CustomerEventsClientGetOptions contains the optional parameters for the CustomerEventsClient.Get method.

type CustomerEventsClientGetResponse added in v0.2.0

type CustomerEventsClientGetResponse struct {
	// The Customer Notification Event resource.
	CustomerEventResource
}

CustomerEventsClientGetResponse contains the response from method CustomerEventsClient.Get.

type CustomerEventsClientListByTestBaseAccountOptions added in v0.2.0

type CustomerEventsClientListByTestBaseAccountOptions struct {
}

CustomerEventsClientListByTestBaseAccountOptions contains the optional parameters for the CustomerEventsClient.NewListByTestBaseAccountPager method.

type CustomerEventsClientListByTestBaseAccountResponse added in v0.2.0

type CustomerEventsClientListByTestBaseAccountResponse struct {
	// A list of Test Base Customer Events.
	CustomerEventListResult
}

CustomerEventsClientListByTestBaseAccountResponse contains the response from method CustomerEventsClient.NewListByTestBaseAccountPager.

type DistributionGroupListReceiverValue

type DistributionGroupListReceiverValue struct {
	// The list of distribution groups.
	DistributionGroups []*string
}

DistributionGroupListReceiverValue - The user object receiver value.

func (DistributionGroupListReceiverValue) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DistributionGroupListReceiverValue.

func (*DistributionGroupListReceiverValue) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DistributionGroupListReceiverValue.

type DownloadURLResponse

type DownloadURLResponse struct {
	// READ-ONLY; The download URL.
	DownloadURL *string

	// READ-ONLY; Expiry date of the download URL.
	ExpirationTime *time.Time
}

DownloadURLResponse - The response of getting a download URL.

func (DownloadURLResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DownloadURLResponse.

func (*DownloadURLResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DownloadURLResponse.

type EmailEventListResult

type EmailEventListResult struct {
	// The list of email events.
	Value []*EmailEventResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

EmailEventListResult - A list of email events.

func (EmailEventListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailEventListResult.

func (*EmailEventListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailEventListResult.

type EmailEventProperties

type EmailEventProperties struct {
	// The display name of the email event.
	DisplayName *string

	// The identifier of the email event.
	EventID *string

	// The name of the email event.
	EventName *string
}

EmailEventProperties - The Email Event properties.

func (EmailEventProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type EmailEventProperties.

func (*EmailEventProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailEventProperties.

type EmailEventResource

type EmailEventResource struct {
	// Email Event properties.
	Properties *EmailEventProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

EmailEventResource - The email event resource.

func (EmailEventResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailEventResource.

func (*EmailEventResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailEventResource.

type EmailEventsClient

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

EmailEventsClient contains the methods for the EmailEvents group. Don't use this type directly, use NewEmailEventsClient() instead.

func NewEmailEventsClient

func NewEmailEventsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EmailEventsClient, error)

NewEmailEventsClient creates a new instance of EmailEventsClient with the specified values.

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

func (*EmailEventsClient) Get

func (client *EmailEventsClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, emailEventResourceName string, options *EmailEventsClientGetOptions) (EmailEventsClientGetResponse, error)

Get - Gets a email event of a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • emailEventResourceName - The resource name of an email event.
  • options - EmailEventsClientGetOptions contains the optional parameters for the EmailEventsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/EmailEventGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEmailEventsClient().Get(ctx, "contoso-rg", "contoso-testBaseAccount", "weekly-summary", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.EmailEventResource = armtestbase.EmailEventResource{
	// 	Name: to.Ptr("weekly-summary"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/emailEvents"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/emailEvents/weekly-summary"),
	// 	Properties: &armtestbase.EmailEventProperties{
	// 		DisplayName: to.Ptr("Weekly Summary"),
	// 		EventID: to.Ptr("weekly-summary"),
	// 		EventName: to.Ptr("weekly-summary"),
	// 	},
	// }
}
Output:

func (*EmailEventsClient) NewListPager added in v0.4.0

func (client *EmailEventsClient) NewListPager(resourceGroupName string, testBaseAccountName string, options *EmailEventsClientListOptions) *runtime.Pager[EmailEventsClientListResponse]

NewListPager - Lists all the email events of a Test Base Account.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - EmailEventsClientListOptions contains the optional parameters for the EmailEventsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/EmailEventsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEmailEventsClient().NewListPager("contoso-rg", "contoso-testBaseAccount", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.EmailEventListResult = armtestbase.EmailEventListResult{
		// 	Value: []*armtestbase.EmailEventResource{
		// 		{
		// 			Name: to.Ptr("weekly-summary"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/emailEvents"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/emailEvents/weekly-summary"),
		// 			Properties: &armtestbase.EmailEventProperties{
		// 				DisplayName: to.Ptr("Weekly Summary"),
		// 				EventID: to.Ptr("weekly-summary"),
		// 				EventName: to.Ptr("weekly-summary"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("daily-summary"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/emailEvents"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/emailEvents/daily-summary"),
		// 			Properties: &armtestbase.EmailEventProperties{
		// 				DisplayName: to.Ptr("Daily Summary"),
		// 				EventID: to.Ptr("daily-summary"),
		// 				EventName: to.Ptr("daily-summary"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type EmailEventsClientGetOptions added in v0.2.0

type EmailEventsClientGetOptions struct {
}

EmailEventsClientGetOptions contains the optional parameters for the EmailEventsClient.Get method.

type EmailEventsClientGetResponse added in v0.2.0

type EmailEventsClientGetResponse struct {
	// The email event resource.
	EmailEventResource
}

EmailEventsClientGetResponse contains the response from method EmailEventsClient.Get.

type EmailEventsClientListOptions added in v0.2.0

type EmailEventsClientListOptions struct {
}

EmailEventsClientListOptions contains the optional parameters for the EmailEventsClient.NewListPager method.

type EmailEventsClientListResponse added in v0.2.0

type EmailEventsClientListResponse struct {
	// A list of email events.
	EmailEventListResult
}

EmailEventsClientListResponse contains the response from method EmailEventsClient.NewListPager.

type ErrorDefinition

type ErrorDefinition struct {
	// READ-ONLY; The error code.
	Code *string

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

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

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

ErrorDefinition - Error definition.

func (ErrorDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.

func (*ErrorDefinition) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.

type ErrorResponse

type ErrorResponse struct {
	// The error details.
	Error *ErrorDefinition
}

ErrorResponse - The error response send when an operation fails.

func (ErrorResponse) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ExecutionStatus

type ExecutionStatus string

ExecutionStatus - The execution status of a test.

const (
	ExecutionStatusCompleted   ExecutionStatus = "Completed"
	ExecutionStatusFailed      ExecutionStatus = "Failed"
	ExecutionStatusInProgress  ExecutionStatus = "InProgress"
	ExecutionStatusIncomplete  ExecutionStatus = "Incomplete"
	ExecutionStatusNone        ExecutionStatus = "None"
	ExecutionStatusNotExecuted ExecutionStatus = "NotExecuted"
	ExecutionStatusProcessing  ExecutionStatus = "Processing"
	ExecutionStatusSucceeded   ExecutionStatus = "Succeeded"
)

func PossibleExecutionStatusValues

func PossibleExecutionStatusValues() []ExecutionStatus

PossibleExecutionStatusValues returns the possible values for the ExecutionStatus const type.

type FavoriteProcessListResult

type FavoriteProcessListResult struct {
	// The list of favorite processes for a package.
	Value []*FavoriteProcessResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

FavoriteProcessListResult - A list of favorite processes for a package.

func (FavoriteProcessListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type FavoriteProcessListResult.

func (*FavoriteProcessListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type FavoriteProcessListResult.

type FavoriteProcessProperties

type FavoriteProcessProperties struct {
	// REQUIRED; The actual name of the favorite process. It will be equal to resource name except for the scenario that the process
	// name contains characters that are not allowed in the resource name.
	ActualProcessName *string
}

FavoriteProcessProperties - Properties of a favorite process identifier.

func (FavoriteProcessProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type FavoriteProcessProperties.

func (*FavoriteProcessProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type FavoriteProcessProperties.

type FavoriteProcessResource

type FavoriteProcessResource struct {
	// Properties of a favorite process identifier.
	Properties *FavoriteProcessProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

FavoriteProcessResource - A favorite process identifier.

func (FavoriteProcessResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type FavoriteProcessResource.

func (*FavoriteProcessResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type FavoriteProcessResource.

type FavoriteProcessesClient

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

FavoriteProcessesClient contains the methods for the FavoriteProcesses group. Don't use this type directly, use NewFavoriteProcessesClient() instead.

func NewFavoriteProcessesClient

func NewFavoriteProcessesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FavoriteProcessesClient, error)

NewFavoriteProcessesClient creates a new instance of FavoriteProcessesClient with the specified values.

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

func (*FavoriteProcessesClient) Create

func (client *FavoriteProcessesClient) Create(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, favoriteProcessResourceName string, parameters FavoriteProcessResource, options *FavoriteProcessesClientCreateOptions) (FavoriteProcessesClientCreateResponse, error)

Create - Create or replace a favorite process for a Test Base Package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • favoriteProcessResourceName - The resource name of a favorite process in a package. If the process name contains characters that are not allowed in Azure Resource Name, we use 'actualProcessName' in request body to submit the name.
  • parameters - Parameters supplied to create a favorite process in a package.
  • options - FavoriteProcessesClientCreateOptions contains the optional parameters for the FavoriteProcessesClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/FavoriteProcessCreate.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFavoriteProcessesClient().Create(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "testAppProcess", armtestbase.FavoriteProcessResource{
		Properties: &armtestbase.FavoriteProcessProperties{
			ActualProcessName: to.Ptr("testApp&.exe"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.FavoriteProcessResource = armtestbase.FavoriteProcessResource{
	// 	Name: to.Ptr("testAppProcess"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/favoriteProcesses"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/favoriteProcesses/testAppProcess"),
	// 	Properties: &armtestbase.FavoriteProcessProperties{
	// 		ActualProcessName: to.Ptr("testApp&.exe"),
	// 	},
	// }
}
Output:

func (*FavoriteProcessesClient) Delete

func (client *FavoriteProcessesClient) Delete(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, favoriteProcessResourceName string, options *FavoriteProcessesClientDeleteOptions) (FavoriteProcessesClientDeleteResponse, error)

Delete - Deletes a favorite process for a specific package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • favoriteProcessResourceName - The resource name of a favorite process in a package. If the process name contains characters that are not allowed in Azure Resource Name, we use 'actualProcessName' in request body to submit the name.
  • options - FavoriteProcessesClientDeleteOptions contains the optional parameters for the FavoriteProcessesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/FavoriteProcessDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewFavoriteProcessesClient().Delete(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "testAppProcess", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FavoriteProcessesClient) Get

func (client *FavoriteProcessesClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, favoriteProcessResourceName string, options *FavoriteProcessesClientGetOptions) (FavoriteProcessesClientGetResponse, error)

Get - Gets a favorite process for a Test Base Package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • favoriteProcessResourceName - The resource name of a favorite process in a package. If the process name contains characters that are not allowed in Azure Resource Name, we use 'actualProcessName' in request body to submit the name.
  • options - FavoriteProcessesClientGetOptions contains the optional parameters for the FavoriteProcessesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/FavoriteProcessGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFavoriteProcessesClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "testAppProcess", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.FavoriteProcessResource = armtestbase.FavoriteProcessResource{
	// 	Name: to.Ptr("testAppProcess"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/favoriteProcesses"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/favoriteProcesses/testAppProcess"),
	// 	Properties: &armtestbase.FavoriteProcessProperties{
	// 		ActualProcessName: to.Ptr("testApp&.exe"),
	// 	},
	// }
}
Output:

func (*FavoriteProcessesClient) NewListPager added in v0.4.0

func (client *FavoriteProcessesClient) NewListPager(resourceGroupName string, testBaseAccountName string, packageName string, options *FavoriteProcessesClientListOptions) *runtime.Pager[FavoriteProcessesClientListResponse]

NewListPager - Lists the favorite processes for a specific package.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • options - FavoriteProcessesClientListOptions contains the optional parameters for the FavoriteProcessesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/FavoriteProcessesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewFavoriteProcessesClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FavoriteProcessListResult = armtestbase.FavoriteProcessListResult{
		// 	Value: []*armtestbase.FavoriteProcessResource{
		// 		{
		// 			Name: to.Ptr("testAppProcess"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/favoriteProcesses"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/favoriteProcesses/testAppProcess"),
		// 			Properties: &armtestbase.FavoriteProcessProperties{
		// 				ActualProcessName: to.Ptr("testApp&.exe"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("anotherProcess"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/favoriteProcesses"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/favoriteProcesses/anotherProcess"),
		// 			Properties: &armtestbase.FavoriteProcessProperties{
		// 				ActualProcessName: to.Ptr("anotherProcess&&.exe"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type FavoriteProcessesClientCreateOptions added in v0.2.0

type FavoriteProcessesClientCreateOptions struct {
}

FavoriteProcessesClientCreateOptions contains the optional parameters for the FavoriteProcessesClient.Create method.

type FavoriteProcessesClientCreateResponse added in v0.2.0

type FavoriteProcessesClientCreateResponse struct {
	// A favorite process identifier.
	FavoriteProcessResource
}

FavoriteProcessesClientCreateResponse contains the response from method FavoriteProcessesClient.Create.

type FavoriteProcessesClientDeleteOptions added in v0.2.0

type FavoriteProcessesClientDeleteOptions struct {
}

FavoriteProcessesClientDeleteOptions contains the optional parameters for the FavoriteProcessesClient.Delete method.

type FavoriteProcessesClientDeleteResponse added in v0.2.0

type FavoriteProcessesClientDeleteResponse struct {
}

FavoriteProcessesClientDeleteResponse contains the response from method FavoriteProcessesClient.Delete.

type FavoriteProcessesClientGetOptions added in v0.2.0

type FavoriteProcessesClientGetOptions struct {
}

FavoriteProcessesClientGetOptions contains the optional parameters for the FavoriteProcessesClient.Get method.

type FavoriteProcessesClientGetResponse added in v0.2.0

type FavoriteProcessesClientGetResponse struct {
	// A favorite process identifier.
	FavoriteProcessResource
}

FavoriteProcessesClientGetResponse contains the response from method FavoriteProcessesClient.Get.

type FavoriteProcessesClientListOptions added in v0.2.0

type FavoriteProcessesClientListOptions struct {
}

FavoriteProcessesClientListOptions contains the optional parameters for the FavoriteProcessesClient.NewListPager method.

type FavoriteProcessesClientListResponse added in v0.2.0

type FavoriteProcessesClientListResponse struct {
	// A list of favorite processes for a package.
	FavoriteProcessListResult
}

FavoriteProcessesClientListResponse contains the response from method FavoriteProcessesClient.NewListPager.

type FileUploadURLResponse

type FileUploadURLResponse struct {
	// READ-ONLY; The blob path of the uploaded package. It will be used as the 'blobPath' property of PackageResource.
	BlobPath *string

	// READ-ONLY; The URL used for uploading the package.
	UploadURL *string
}

FileUploadURLResponse - The URL response

func (FileUploadURLResponse) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type FileUploadURLResponse.

func (*FileUploadURLResponse) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type FileUploadURLResponse.

type FlightingRingListResult

type FlightingRingListResult struct {
	// The list of flighting rings.
	Value []*FlightingRingResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

FlightingRingListResult - A list of flighting rings.

func (FlightingRingListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type FlightingRingListResult.

func (*FlightingRingListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type FlightingRingListResult.

type FlightingRingProperties

type FlightingRingProperties struct {
	// The actual name of a flighting ring of a Test Base Account.
	ActualFlightingRingName *string
}

FlightingRingProperties - The Flighting Ring properties.

func (FlightingRingProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type FlightingRingProperties.

func (*FlightingRingProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type FlightingRingProperties.

type FlightingRingResource

type FlightingRingResource struct {
	// Flighting Ring properties.
	Properties *FlightingRingProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

FlightingRingResource - The flighting ring resource.

func (FlightingRingResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type FlightingRingResource.

func (*FlightingRingResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type FlightingRingResource.

type FlightingRingsClient

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

FlightingRingsClient contains the methods for the FlightingRings group. Don't use this type directly, use NewFlightingRingsClient() instead.

func NewFlightingRingsClient

func NewFlightingRingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FlightingRingsClient, error)

NewFlightingRingsClient creates a new instance of FlightingRingsClient with the specified values.

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

func (*FlightingRingsClient) Get

func (client *FlightingRingsClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, flightingRingResourceName string, options *FlightingRingsClientGetOptions) (FlightingRingsClientGetResponse, error)

Get - Gets a flighting ring of a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • flightingRingResourceName - The resource name of a flighting ring.
  • options - FlightingRingsClientGetOptions contains the optional parameters for the FlightingRingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/FlightingRingGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFlightingRingsClient().Get(ctx, "contoso-rg", "contoso-testBaseAccount", "Insider-Beta-Channel", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.FlightingRingResource = armtestbase.FlightingRingResource{
	// 	Name: to.Ptr("Insider-Beta-Channel"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/flightingRings"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/flightingRings/Insider-Beta-Channel"),
	// 	Properties: &armtestbase.FlightingRingProperties{
	// 		ActualFlightingRingName: to.Ptr("Insider Beta Channel"),
	// 	},
	// }
}
Output:

func (*FlightingRingsClient) NewListPager added in v0.4.0

func (client *FlightingRingsClient) NewListPager(resourceGroupName string, testBaseAccountName string, options *FlightingRingsClientListOptions) *runtime.Pager[FlightingRingsClientListResponse]

NewListPager - Lists all the flighting rings of a Test Base Account.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - FlightingRingsClientListOptions contains the optional parameters for the FlightingRingsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/FlightingRingsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewFlightingRingsClient().NewListPager("contoso-rg", "contoso-testBaseAccount", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FlightingRingListResult = armtestbase.FlightingRingListResult{
		// 	Value: []*armtestbase.FlightingRingResource{
		// 		{
		// 			Name: to.Ptr("Insider-Beta-Channel"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/flightingRings"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/flightingRings/Insider-Beta-Channel"),
		// 			Properties: &armtestbase.FlightingRingProperties{
		// 				ActualFlightingRingName: to.Ptr("Insider Beta Channel"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Another-Channel"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/flightingRings"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/flightingRings/Another-Channel"),
		// 			Properties: &armtestbase.FlightingRingProperties{
		// 				ActualFlightingRingName: to.Ptr("Another Channel"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type FlightingRingsClientGetOptions added in v0.2.0

type FlightingRingsClientGetOptions struct {
}

FlightingRingsClientGetOptions contains the optional parameters for the FlightingRingsClient.Get method.

type FlightingRingsClientGetResponse added in v0.2.0

type FlightingRingsClientGetResponse struct {
	// The flighting ring resource.
	FlightingRingResource
}

FlightingRingsClientGetResponse contains the response from method FlightingRingsClient.Get.

type FlightingRingsClientListOptions added in v0.2.0

type FlightingRingsClientListOptions struct {
}

FlightingRingsClientListOptions contains the optional parameters for the FlightingRingsClient.NewListPager method.

type FlightingRingsClientListResponse added in v0.2.0

type FlightingRingsClientListResponse struct {
	// A list of flighting rings.
	FlightingRingListResult
}

FlightingRingsClientListResponse contains the response from method FlightingRingsClient.NewListPager.

type GetFileUploadURLParameters

type GetFileUploadURLParameters struct {
	// The custom file name of the uploaded blob.
	BlobName *string
}

GetFileUploadURLParameters - The parameters supplied to the Test Base Account GetFileUploadURL action.

func (GetFileUploadURLParameters) MarshalJSON added in v0.6.0

func (g GetFileUploadURLParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GetFileUploadURLParameters.

func (*GetFileUploadURLParameters) UnmarshalJSON added in v0.6.0

func (g *GetFileUploadURLParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GetFileUploadURLParameters.

type Grade

type Grade string

Grade - The grade of a test.

const (
	GradeFail         Grade = "Fail"
	GradeNone         Grade = "None"
	GradeNotAvailable Grade = "NotAvailable"
	GradePass         Grade = "Pass"
)

func PossibleGradeValues

func PossibleGradeValues() []Grade

PossibleGradeValues returns the possible values for the Grade const type.

type IdentifiedFailure

type IdentifiedFailure struct {
	// The category of the failure.
	Category *Category

	// Message that shows information about the failure.
	ErrorMessage *string

	// The Failure Id.
	FailureID *string

	// Guidance that shows what the customer needs to do for this failure.
	Guidance *string
}

IdentifiedFailure - The failure identified.

func (IdentifiedFailure) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type IdentifiedFailure.

func (*IdentifiedFailure) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentifiedFailure.

type MemoryRegressionResultSingletonResourceProperties

type MemoryRegressionResultSingletonResourceProperties struct {
	// REQUIRED; Type of the Analysis Result.
	AnalysisResultType *AnalysisResultType

	// The grade of the test.
	Grade *Grade

	// The result array data.
	MemoryRegressionResults []*RegressionResult
}

MemoryRegressionResultSingletonResourceProperties - The properties of Memory Regression Result.

func (*MemoryRegressionResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties added in v0.2.0

func (m *MemoryRegressionResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties

GetAnalysisResultSingletonResourceProperties implements the AnalysisResultSingletonResourcePropertiesClassification interface for type MemoryRegressionResultSingletonResourceProperties.

func (MemoryRegressionResultSingletonResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type MemoryRegressionResultSingletonResourceProperties.

func (*MemoryRegressionResultSingletonResourceProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type MemoryRegressionResultSingletonResourceProperties.

type MemoryUtilizationResultSingletonResourceProperties

type MemoryUtilizationResultSingletonResourceProperties struct {
	// REQUIRED; Type of the Analysis Result.
	AnalysisResultType *AnalysisResultType

	// The grade of the test.
	Grade *Grade

	// The result array data.
	MemoryUtilizationResults []*UtilizationResult
}

MemoryUtilizationResultSingletonResourceProperties - The properties of Memory Utilization Result.

func (*MemoryUtilizationResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties added in v0.2.0

func (m *MemoryUtilizationResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties

GetAnalysisResultSingletonResourceProperties implements the AnalysisResultSingletonResourcePropertiesClassification interface for type MemoryUtilizationResultSingletonResourceProperties.

func (MemoryUtilizationResultSingletonResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type MemoryUtilizationResultSingletonResourceProperties.

func (*MemoryUtilizationResultSingletonResourceProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type MemoryUtilizationResultSingletonResourceProperties.

type NotificationEventReceiver

type NotificationEventReceiver struct {
	// The type of the notification event receiver.
	ReceiverType *string

	// The notification event receiver value.
	ReceiverValue *NotificationReceiverValue
}

NotificationEventReceiver - A notification event receivers.

func (NotificationEventReceiver) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type NotificationEventReceiver.

func (*NotificationEventReceiver) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationEventReceiver.

type NotificationReceiverValue

type NotificationReceiverValue struct {
	// The user object receiver value.
	DistributionGroupListReceiverValue *DistributionGroupListReceiverValue

	// The user object receiver value.
	SubscriptionReceiverValue *SubscriptionReceiverValue

	// The user object receiver value.
	UserObjectReceiverValue *UserObjectReceiverValue
}

NotificationReceiverValue - A notification event receiver value.

func (NotificationReceiverValue) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type NotificationReceiverValue.

func (*NotificationReceiverValue) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationReceiverValue.

type OSUpdateListResult

type OSUpdateListResult struct {
	// The list of OS Updates.
	Value []*OSUpdateResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

OSUpdateListResult - A list of OS Updates.

func (OSUpdateListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OSUpdateListResult.

func (*OSUpdateListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OSUpdateListResult.

type OSUpdateProperties

type OSUpdateProperties struct {
	// The build revision of the tested release (OS update)
	BuildRevision *string

	// The build version of the tested release (OS update).
	BuildVersion *string

	// The flighting ring, only for release of feature updates.
	FlightingRing *string

	// The name of the OS.
	OSName *string

	// The name of tested release.
	Release *string

	// The release version date the tested release (OS update)
	ReleaseVersionDate *time.Time

	// The type of this release (OS update).
	Type *Type
}

OSUpdateProperties - Properties of an OS Update.

func (OSUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OSUpdateProperties.

func (*OSUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OSUpdateProperties.

type OSUpdateResource

type OSUpdateResource struct {
	// Properties of an OS Update.
	Properties *OSUpdateProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

OSUpdateResource - An OS Update.

func (OSUpdateResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OSUpdateResource.

func (*OSUpdateResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OSUpdateResource.

type OSUpdateTestSummary

type OSUpdateTestSummary struct {
	// The build revision of the tested release (OS update)
	BuildRevision *string

	// The build version of the tested release (OS update)
	BuildVersion *string

	// The execution status of the test.
	ExecutionStatus *ExecutionStatus

	// The flighting ring, only for release of feature updates.
	FlightingRing *string

	// The grade of the test.
	Grade *Grade

	// The operating system name. e.g. Windows 10 1809.
	OSName *string

	// The name of the tested release (OS update).
	ReleaseName *string

	// The release version date.
	ReleaseVersionDate *time.Time

	// The run time of the test.
	TestRunTime *string

	// The status of the test.
	TestStatus *TestStatus

	// The test type of the package
	TestType *string
}

OSUpdateTestSummary - The summary of a test.

func (OSUpdateTestSummary) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OSUpdateTestSummary.

func (*OSUpdateTestSummary) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OSUpdateTestSummary.

type OSUpdatesClient

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

OSUpdatesClient contains the methods for the OSUpdates group. Don't use this type directly, use NewOSUpdatesClient() instead.

func NewOSUpdatesClient

func NewOSUpdatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OSUpdatesClient, error)

NewOSUpdatesClient creates a new instance of OSUpdatesClient with the specified values.

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

func (*OSUpdatesClient) Get

func (client *OSUpdatesClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, osUpdateResourceName string, options *OSUpdatesClientGetOptions) (OSUpdatesClientGetResponse, error)

Get - Gets an OS Update by name in which the package was tested before. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • osUpdateResourceName - The resource name of an OS Update.
  • options - OSUpdatesClientGetOptions contains the optional parameters for the OSUpdatesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/OSUpdateGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOSUpdatesClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-2004-2020-12-B-505", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OSUpdateResource = armtestbase.OSUpdateResource{
	// 	Name: to.Ptr("Windows-10-2004-2020-12-B-505"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/osUpdates"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/osUpdates/Windows-10-2004-2020-12-B-505"),
	// 	Properties: &armtestbase.OSUpdateProperties{
	// 		Type: to.Ptr(armtestbase.TypeSecurityUpdate),
	// 		BuildRevision: to.Ptr("505"),
	// 		OSName: to.Ptr("Windows 10 2004"),
	// 		Release: to.Ptr("2020.12B"),
	// 	},
	// }
}
Output:

func (*OSUpdatesClient) NewListPager added in v0.4.0

func (client *OSUpdatesClient) NewListPager(resourceGroupName string, testBaseAccountName string, packageName string, osUpdateType OsUpdateType, options *OSUpdatesClientListOptions) *runtime.Pager[OSUpdatesClientListResponse]

NewListPager - Lists the OS Updates in which the package were tested before.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • osUpdateType - The type of the OS Update.
  • options - OSUpdatesClientListOptions contains the optional parameters for the OSUpdatesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/OSUpdatesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOSUpdatesClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", armtestbase.OsUpdateTypeSecurityUpdate, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OSUpdateListResult = armtestbase.OSUpdateListResult{
		// 	Value: []*armtestbase.OSUpdateResource{
		// 		{
		// 			Name: to.Ptr("Windows-10-2004-2020-12-B-505"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/osUpdates"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/osUpdates/Windows-10-2004-2020-12-B-505"),
		// 			Properties: &armtestbase.OSUpdateProperties{
		// 				Type: to.Ptr(armtestbase.TypeSecurityUpdate),
		// 				BuildRevision: to.Ptr("505"),
		// 				OSName: to.Ptr("Windows 10 2004"),
		// 				Release: to.Ptr("2020.12B"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Windows-10-2004-2020-10-B-413"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/osUpdates"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/osUpdates/Windows-10-2004-2020-10-B-413"),
		// 			Properties: &armtestbase.OSUpdateProperties{
		// 				Type: to.Ptr(armtestbase.TypeSecurityUpdate),
		// 				BuildRevision: to.Ptr("413"),
		// 				OSName: to.Ptr("Windows 10 2004"),
		// 				Release: to.Ptr("2020.10B"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Windows-10-2004-2020-08-B-226"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/osUpdates"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/osUpdates/Windows-10-2004-2020-08-B-226"),
		// 			Properties: &armtestbase.OSUpdateProperties{
		// 				Type: to.Ptr(armtestbase.TypeSecurityUpdate),
		// 				BuildRevision: to.Ptr("226"),
		// 				OSName: to.Ptr("Windows 10 2004"),
		// 				Release: to.Ptr("2020.08B"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OSUpdatesClientGetOptions added in v0.2.0

type OSUpdatesClientGetOptions struct {
}

OSUpdatesClientGetOptions contains the optional parameters for the OSUpdatesClient.Get method.

type OSUpdatesClientGetResponse added in v0.2.0

type OSUpdatesClientGetResponse struct {
	// An OS Update.
	OSUpdateResource
}

OSUpdatesClientGetResponse contains the response from method OSUpdatesClient.Get.

type OSUpdatesClientListOptions added in v0.2.0

type OSUpdatesClientListOptions struct {
}

OSUpdatesClientListOptions contains the optional parameters for the OSUpdatesClient.NewListPager method.

type OSUpdatesClientListResponse added in v0.2.0

type OSUpdatesClientListResponse struct {
	// A list of OS Updates.
	OSUpdateListResult
}

OSUpdatesClientListResponse contains the response from method OSUpdatesClient.NewListPager.

type OSUpdatesTestSummary

type OSUpdatesTestSummary struct {
	// The status of the last test.
	ExecutionStatus *ExecutionStatus

	// The grade of last test.
	Grade *Grade

	// Detailed summary for each OS update
	OSUpdateTestSummaries []*OSUpdateTestSummary

	// The run time of the last test.
	TestRunTime *string

	// The status of last test.
	TestStatus *TestStatus
}

OSUpdatesTestSummary - The summary of some tests.

func (OSUpdatesTestSummary) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OSUpdatesTestSummary.

func (*OSUpdatesTestSummary) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OSUpdatesTestSummary.

type Operation

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

	// Extra properties of the operation.
	Properties any

	// READ-ONLY; Indicates whether the operation is a data action
	IsDataAction *bool

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}.
	Name *string

	// READ-ONLY; Origin of the operation
	Origin *string
}

Operation - REST API operation

func (Operation) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; Friendly name of the operation.
	Description *string

	// READ-ONLY; Operation type: read, write, delete, listPackages, etc.
	Operation *string

	// READ-ONLY; The resource provider name: Microsoft.TestBase.
	Provider *string

	// READ-ONLY; Resource type on which the operation is performed.
	Resource *string
}

OperationDisplay - The object that describes the operation.

func (OperationDisplay) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// List of operations supported by the Test Base resource provider.
	Value []*Operation

	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string
}

OperationListResult - A list of operations supported by the resource provider.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Lists all of the available REST API operations of the Microsoft.TestBase provider.

Generated from API version 2020-12-16-preview

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/OperationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armtestbase.OperationListResult{
		// 	Value: []*armtestbase.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.TestBase/testBaseAccounts/read"),
		// 			Display: &armtestbase.OperationDisplay{
		// 				Description: to.Ptr("View the properties of a Test Base Account."),
		// 				Operation: to.Ptr("View Test Base Account"),
		// 				Provider: to.Ptr("Microsoft Test Base"),
		// 				Resource: to.Ptr("Test Base Account"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.TestBase/testBaseAccounts/write"),
		// 			Display: &armtestbase.OperationDisplay{
		// 				Description: to.Ptr("Create a new Test Base Account or update the properties of an existing Test Base Account."),
		// 				Operation: to.Ptr("Update Test Base Account"),
		// 				Provider: to.Ptr("Microsoft Test Base"),
		// 				Resource: to.Ptr("Test Base Account"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.TestBase/testBaseAccounts/delete"),
		// 			Display: &armtestbase.OperationDisplay{
		// 				Description: to.Ptr("Delete a Test Base Account."),
		// 				Operation: to.Ptr("Delete Test Base Account"),
		// 				Provider: to.Ptr("Microsoft Test Base"),
		// 				Resource: to.Ptr("Test Base Account"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// A list of operations supported by the resource provider.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OsUpdateType

type OsUpdateType string
const (
	OsUpdateTypeFeatureUpdate  OsUpdateType = "FeatureUpdate"
	OsUpdateTypeSecurityUpdate OsUpdateType = "SecurityUpdate"
)

func PossibleOsUpdateTypeValues

func PossibleOsUpdateTypeValues() []OsUpdateType

PossibleOsUpdateTypeValues returns the possible values for the OsUpdateType const type.

type PackageCheckNameAvailabilityParameters

type PackageCheckNameAvailabilityParameters struct {
	// REQUIRED; Application name to verify.
	ApplicationName *string

	// REQUIRED; Resource name to verify.
	Name *string

	// REQUIRED; fully qualified resource type which includes provider namespace.
	Type *string

	// REQUIRED; Version name to verify.
	Version *string
}

PackageCheckNameAvailabilityParameters - Parameters body to pass for Test Base Package name availability check.

func (PackageCheckNameAvailabilityParameters) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type PackageCheckNameAvailabilityParameters.

func (*PackageCheckNameAvailabilityParameters) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PackageCheckNameAvailabilityParameters.

type PackageListResult

type PackageListResult struct {
	// The list of Test Base Packages.
	Value []*PackageResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

PackageListResult - A list of Test Base Packages.

func (PackageListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PackageListResult.

func (*PackageListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PackageListResult.

type PackageProperties

type PackageProperties struct {
	// REQUIRED; Application name
	ApplicationName *string

	// REQUIRED; The file path of the package.
	BlobPath *string

	// REQUIRED; The flighting ring for feature update.
	FlightingRing *string

	// REQUIRED; Specifies the target OSs of specific OS Update types.
	TargetOSList []*TargetOSInfo

	// REQUIRED; The detailed test information.
	Tests []*Test

	// REQUIRED; Application version
	Version *string

	// READ-ONLY; Flag showing that whether the package is enabled. It doesn't schedule test for package which is not enabled.
	IsEnabled *bool

	// READ-ONLY; The UTC timestamp when the package was last modified.
	LastModifiedTime *time.Time

	// READ-ONLY; The status of the package.
	PackageStatus *PackageStatus

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; OOB, functional or both. Mapped to the data in 'tests' property.
	TestTypes []*TestType

	// READ-ONLY; The validation results. There's validation on package when it's created or updated.
	ValidationResults []*PackageValidationResult
}

PackageProperties - The properties of the Test Base Package.

func (PackageProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PackageProperties.

func (*PackageProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PackageProperties.

type PackageResource

type PackageResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Test Base Package properties.
	Properties *PackageProperties

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

	// READ-ONLY; Resource Etag.
	Etag *string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

PackageResource - The Test Base Package resource.

func (PackageResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PackageResource.

func (*PackageResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PackageResource.

type PackageStatus

type PackageStatus string

PackageStatus - The status of the package.

const (
	PackageStatusDeleted                   PackageStatus = "Deleted"
	PackageStatusError                     PackageStatus = "Error"
	PackageStatusPreValidationCheckPass    PackageStatus = "PreValidationCheckPass"
	PackageStatusReady                     PackageStatus = "Ready"
	PackageStatusRegistered                PackageStatus = "Registered"
	PackageStatusUnknown                   PackageStatus = "Unknown"
	PackageStatusValidatingPackage         PackageStatus = "ValidatingPackage"
	PackageStatusValidationLongerThanUsual PackageStatus = "ValidationLongerThanUsual"
	PackageStatusVerifyingPackage          PackageStatus = "VerifyingPackage"
)

func PossiblePackageStatusValues

func PossiblePackageStatusValues() []PackageStatus

PossiblePackageStatusValues returns the possible values for the PackageStatus const type.

type PackageUpdateParameterProperties

type PackageUpdateParameterProperties struct {
	// The file name of the package.
	BlobPath *string

	// The flighting ring for feature update.
	FlightingRing *string

	// Specifies whether the package is enabled. It doesn't schedule test for package which is not enabled.
	IsEnabled *bool

	// Specifies the target OSs of specific OS Update types.
	TargetOSList []*TargetOSInfo

	// The detailed test information.
	Tests []*Test
}

PackageUpdateParameterProperties - Parameters supplied to update a Test Base Package.

func (PackageUpdateParameterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PackageUpdateParameterProperties.

func (*PackageUpdateParameterProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PackageUpdateParameterProperties.

type PackageUpdateParameters

type PackageUpdateParameters struct {
	// Test Base Package update parameters.
	Properties *PackageUpdateParameterProperties

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

PackageUpdateParameters - Parameters supplied to update a Test Base Package.

func (PackageUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PackageUpdateParameters.

func (*PackageUpdateParameters) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PackageUpdateParameters.

type PackageValidationResult

type PackageValidationResult struct {
	// READ-ONLY; Error information.
	Errors []*string

	// READ-ONLY; Indicates whether the package passed the validation.
	IsValid *bool

	// READ-ONLY; Validation name.
	ValidationName *string
}

PackageValidationResult - The validation results. There's validation on package when it's created or updated.

func (PackageValidationResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PackageValidationResult.

func (*PackageValidationResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PackageValidationResult.

type PackagesClient

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

PackagesClient contains the methods for the Packages group. Don't use this type directly, use NewPackagesClient() instead.

func NewPackagesClient

func NewPackagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PackagesClient, error)

NewPackagesClient creates a new instance of PackagesClient with the specified values.

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

func (*PackagesClient) BeginCreate

func (client *PackagesClient) BeginCreate(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, parameters PackageResource, options *PackagesClientBeginCreateOptions) (*runtime.Poller[PackagesClientCreateResponse], error)

BeginCreate - Create or replace (overwrite/recreate, with potential downtime) a Test Base Package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • parameters - Parameters supplied to create a Test Base Package.
  • options - PackagesClientBeginCreateOptions contains the optional parameters for the PackagesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/PackageCreate.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPackagesClient().BeginCreate(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", armtestbase.PackageResource{
		Location: to.Ptr("westus"),
		Tags:     map[string]*string{},
		Properties: &armtestbase.PackageProperties{
			ApplicationName: to.Ptr("contoso-package2"),
			BlobPath:        to.Ptr("storageAccountPath/package.zip"),
			FlightingRing:   to.Ptr("Insider Beta Channel"),
			TargetOSList: []*armtestbase.TargetOSInfo{
				{
					OSUpdateType: to.Ptr("Security updates"),
					TargetOSs: []*string{
						to.Ptr("Windows 10 2004"),
						to.Ptr("Windows 10 1903")},
				}},
			Tests: []*armtestbase.Test{
				{
					IsActive: to.Ptr(true),
					TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
					Commands: []*armtestbase.Command{
						{
							Name:              to.Ptr("Install"),
							Action:            to.Ptr(armtestbase.ActionInstall),
							AlwaysRun:         to.Ptr(true),
							ApplyUpdateBefore: to.Ptr(false),
							Content:           to.Ptr("app/scripts/install/job.ps1"),
							ContentType:       to.Ptr(armtestbase.ContentTypePath),
							MaxRunTime:        to.Ptr[int32](1800),
							RestartAfter:      to.Ptr(true),
							RunAsInteractive:  to.Ptr(true),
							RunElevated:       to.Ptr(true),
						},
						{
							Name:              to.Ptr("Launch"),
							Action:            to.Ptr(armtestbase.ActionLaunch),
							AlwaysRun:         to.Ptr(false),
							ApplyUpdateBefore: to.Ptr(true),
							Content:           to.Ptr("app/scripts/launch/job.ps1"),
							ContentType:       to.Ptr(armtestbase.ContentTypePath),
							MaxRunTime:        to.Ptr[int32](1800),
							RestartAfter:      to.Ptr(false),
							RunAsInteractive:  to.Ptr(true),
							RunElevated:       to.Ptr(true),
						},
						{
							Name:              to.Ptr("Close"),
							Action:            to.Ptr(armtestbase.ActionClose),
							AlwaysRun:         to.Ptr(false),
							ApplyUpdateBefore: to.Ptr(false),
							Content:           to.Ptr("app/scripts/close/job.ps1"),
							ContentType:       to.Ptr(armtestbase.ContentTypePath),
							MaxRunTime:        to.Ptr[int32](1800),
							RestartAfter:      to.Ptr(false),
							RunAsInteractive:  to.Ptr(true),
							RunElevated:       to.Ptr(true),
						},
						{
							Name:              to.Ptr("Uninstall"),
							Action:            to.Ptr(armtestbase.ActionUninstall),
							AlwaysRun:         to.Ptr(true),
							ApplyUpdateBefore: to.Ptr(false),
							Content:           to.Ptr("app/scripts/uninstall/job.ps1"),
							ContentType:       to.Ptr(armtestbase.ContentTypePath),
							MaxRunTime:        to.Ptr[int32](1800),
							RestartAfter:      to.Ptr(false),
							RunAsInteractive:  to.Ptr(true),
							RunElevated:       to.Ptr(true),
						}},
				}},
			Version: to.Ptr("1.0.0"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PackageResource = armtestbase.PackageResource{
	// 	Name: to.Ptr("contoso-package2"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armtestbase.PackageProperties{
	// 		ApplicationName: to.Ptr("contoso-package2"),
	// 		BlobPath: to.Ptr("storageAccountPath/package.zip"),
	// 		FlightingRing: to.Ptr("Insider Beta Channel"),
	// 		IsEnabled: to.Ptr(true),
	// 		LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
	// 		PackageStatus: to.Ptr(armtestbase.PackageStatusReady),
	// 		ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
	// 		TargetOSList: []*armtestbase.TargetOSInfo{
	// 			{
	// 				OSUpdateType: to.Ptr("Security updates"),
	// 				TargetOSs: []*string{
	// 					to.Ptr("Windows 10 2004"),
	// 					to.Ptr("Windows 10 1903")},
	// 			}},
	// 			TestTypes: []*armtestbase.TestType{
	// 				to.Ptr(armtestbase.TestTypeOutOfBoxTest)},
	// 				Tests: []*armtestbase.Test{
	// 					{
	// 						IsActive: to.Ptr(true),
	// 						TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
	// 						ValidationRunStatus: to.Ptr(armtestbase.ValidationRunStatusPassed),
	// 						Commands: []*armtestbase.Command{
	// 							{
	// 								Name: to.Ptr("Install"),
	// 								Action: to.Ptr(armtestbase.ActionInstall),
	// 								AlwaysRun: to.Ptr(true),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/install/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(true),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Launch"),
	// 								Action: to.Ptr(armtestbase.ActionLaunch),
	// 								AlwaysRun: to.Ptr(false),
	// 								ApplyUpdateBefore: to.Ptr(true),
	// 								Content: to.Ptr("app/scripts/launch/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Close"),
	// 								Action: to.Ptr(armtestbase.ActionClose),
	// 								AlwaysRun: to.Ptr(false),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/close/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Uninstall"),
	// 								Action: to.Ptr(armtestbase.ActionUninstall),
	// 								AlwaysRun: to.Ptr(true),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/uninstall/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 						}},
	// 				}},
	// 				ValidationResults: []*armtestbase.PackageValidationResult{
	// 					{
	// 						IsValid: to.Ptr(true),
	// 						ValidationName: to.Ptr("Syntax Validation"),
	// 					},
	// 					{
	// 						IsValid: to.Ptr(true),
	// 						ValidationName: to.Ptr("Package Run Validation"),
	// 				}},
	// 				Version: to.Ptr("1.0.0"),
	// 			},
	// 		}
}
Output:

func (*PackagesClient) BeginDelete

func (client *PackagesClient) BeginDelete(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, options *PackagesClientBeginDeleteOptions) (*runtime.Poller[PackagesClientDeleteResponse], error)

BeginDelete - Deletes a Test Base Package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • options - PackagesClientBeginDeleteOptions contains the optional parameters for the PackagesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/PackageDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPackagesClient().BeginDelete(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PackagesClient) BeginHardDelete

func (client *PackagesClient) BeginHardDelete(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, options *PackagesClientBeginHardDeleteOptions) (*runtime.Poller[PackagesClientHardDeleteResponse], error)

BeginHardDelete - Hard Delete a Test Base Package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • options - PackagesClientBeginHardDeleteOptions contains the optional parameters for the PackagesClient.BeginHardDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/PackageHardDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPackagesClient().BeginHardDelete(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PackagesClient) BeginUpdate

func (client *PackagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, parameters PackageUpdateParameters, options *PackagesClientBeginUpdateOptions) (*runtime.Poller[PackagesClientUpdateResponse], error)

BeginUpdate - Update an existing Test Base Package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • parameters - Parameters supplied to update a Test Base Package.
  • options - PackagesClientBeginUpdateOptions contains the optional parameters for the PackagesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/PackageUpdate.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPackagesClient().BeginUpdate(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", armtestbase.PackageUpdateParameters{
		Properties: &armtestbase.PackageUpdateParameterProperties{
			BlobPath:      to.Ptr("storageAccountPath/package.zip"),
			FlightingRing: to.Ptr("Insider Beta Channel"),
			IsEnabled:     to.Ptr(false),
			TargetOSList: []*armtestbase.TargetOSInfo{
				{
					OSUpdateType: to.Ptr("Security updates"),
					TargetOSs: []*string{
						to.Ptr("Windows 10 2004"),
						to.Ptr("Windows 10 1903")},
				}},
			Tests: []*armtestbase.Test{
				{
					IsActive: to.Ptr(true),
					TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
					Commands: []*armtestbase.Command{
						{
							Name:              to.Ptr("Install"),
							Action:            to.Ptr(armtestbase.ActionInstall),
							AlwaysRun:         to.Ptr(true),
							ApplyUpdateBefore: to.Ptr(false),
							Content:           to.Ptr("app/scripts/install/job.ps1"),
							ContentType:       to.Ptr(armtestbase.ContentTypePath),
							MaxRunTime:        to.Ptr[int32](1800),
							RestartAfter:      to.Ptr(true),
							RunAsInteractive:  to.Ptr(true),
							RunElevated:       to.Ptr(true),
						},
						{
							Name:              to.Ptr("Launch"),
							Action:            to.Ptr(armtestbase.ActionLaunch),
							AlwaysRun:         to.Ptr(false),
							ApplyUpdateBefore: to.Ptr(true),
							Content:           to.Ptr("app/scripts/launch/job.ps1"),
							ContentType:       to.Ptr(armtestbase.ContentTypePath),
							MaxRunTime:        to.Ptr[int32](1800),
							RestartAfter:      to.Ptr(false),
							RunAsInteractive:  to.Ptr(true),
							RunElevated:       to.Ptr(true),
						},
						{
							Name:              to.Ptr("Close"),
							Action:            to.Ptr(armtestbase.ActionClose),
							AlwaysRun:         to.Ptr(false),
							ApplyUpdateBefore: to.Ptr(false),
							Content:           to.Ptr("app/scripts/close/job.ps1"),
							ContentType:       to.Ptr(armtestbase.ContentTypePath),
							MaxRunTime:        to.Ptr[int32](1800),
							RestartAfter:      to.Ptr(false),
							RunAsInteractive:  to.Ptr(true),
							RunElevated:       to.Ptr(true),
						},
						{
							Name:              to.Ptr("Uninstall"),
							Action:            to.Ptr(armtestbase.ActionUninstall),
							AlwaysRun:         to.Ptr(true),
							ApplyUpdateBefore: to.Ptr(false),
							Content:           to.Ptr("app/scripts/uninstall/job.ps1"),
							ContentType:       to.Ptr(armtestbase.ContentTypePath),
							MaxRunTime:        to.Ptr[int32](1800),
							RestartAfter:      to.Ptr(false),
							RunAsInteractive:  to.Ptr(true),
							RunElevated:       to.Ptr(true),
						}},
				}},
		},
		Tags: map[string]*string{},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PackageResource = armtestbase.PackageResource{
	// 	Name: to.Ptr("contoso-package2"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armtestbase.PackageProperties{
	// 		ApplicationName: to.Ptr("contoso-package2"),
	// 		BlobPath: to.Ptr("storageAccountPath/package.zip"),
	// 		FlightingRing: to.Ptr("Insider Beta Channel"),
	// 		IsEnabled: to.Ptr(false),
	// 		LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
	// 		PackageStatus: to.Ptr(armtestbase.PackageStatusReady),
	// 		ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
	// 		TargetOSList: []*armtestbase.TargetOSInfo{
	// 			{
	// 				OSUpdateType: to.Ptr("Security updates"),
	// 				TargetOSs: []*string{
	// 					to.Ptr("Windows 10 2004"),
	// 					to.Ptr("Windows 10 1903")},
	// 			}},
	// 			TestTypes: []*armtestbase.TestType{
	// 				to.Ptr(armtestbase.TestTypeOutOfBoxTest)},
	// 				Tests: []*armtestbase.Test{
	// 					{
	// 						IsActive: to.Ptr(true),
	// 						TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
	// 						ValidationRunStatus: to.Ptr(armtestbase.ValidationRunStatusPassed),
	// 						Commands: []*armtestbase.Command{
	// 							{
	// 								Name: to.Ptr("Install"),
	// 								Action: to.Ptr(armtestbase.ActionInstall),
	// 								AlwaysRun: to.Ptr(true),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/install/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(true),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Launch"),
	// 								Action: to.Ptr(armtestbase.ActionLaunch),
	// 								AlwaysRun: to.Ptr(false),
	// 								ApplyUpdateBefore: to.Ptr(true),
	// 								Content: to.Ptr("app/scripts/launch/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Close"),
	// 								Action: to.Ptr(armtestbase.ActionClose),
	// 								AlwaysRun: to.Ptr(false),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/close/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Uninstall"),
	// 								Action: to.Ptr(armtestbase.ActionUninstall),
	// 								AlwaysRun: to.Ptr(true),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/uninstall/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 						}},
	// 				}},
	// 				ValidationResults: []*armtestbase.PackageValidationResult{
	// 					{
	// 						IsValid: to.Ptr(true),
	// 						ValidationName: to.Ptr("Syntax Validation"),
	// 					},
	// 					{
	// 						IsValid: to.Ptr(true),
	// 						ValidationName: to.Ptr("Package Run Validation"),
	// 				}},
	// 				Version: to.Ptr("1.0.0"),
	// 			},
	// 		}
}
Output:

func (*PackagesClient) Get

func (client *PackagesClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, options *PackagesClientGetOptions) (PackagesClientGetResponse, error)

Get - Gets a Test Base Package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • options - PackagesClientGetOptions contains the optional parameters for the PackagesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/PackageGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPackagesClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PackageResource = armtestbase.PackageResource{
	// 	Name: to.Ptr("contoso-package2"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armtestbase.PackageProperties{
	// 		ApplicationName: to.Ptr("contoso-package2"),
	// 		BlobPath: to.Ptr("storageAccountPath/package.zip"),
	// 		FlightingRing: to.Ptr("Insider Beta Channel"),
	// 		IsEnabled: to.Ptr(true),
	// 		LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
	// 		PackageStatus: to.Ptr(armtestbase.PackageStatusReady),
	// 		ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
	// 		TargetOSList: []*armtestbase.TargetOSInfo{
	// 			{
	// 				OSUpdateType: to.Ptr("Security updates"),
	// 				TargetOSs: []*string{
	// 					to.Ptr("Windows 10 2004"),
	// 					to.Ptr("Windows 10 1903")},
	// 			}},
	// 			TestTypes: []*armtestbase.TestType{
	// 				to.Ptr(armtestbase.TestTypeOutOfBoxTest)},
	// 				Tests: []*armtestbase.Test{
	// 					{
	// 						IsActive: to.Ptr(true),
	// 						TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
	// 						ValidationRunStatus: to.Ptr(armtestbase.ValidationRunStatusPassed),
	// 						Commands: []*armtestbase.Command{
	// 							{
	// 								Name: to.Ptr("Install"),
	// 								Action: to.Ptr(armtestbase.ActionInstall),
	// 								AlwaysRun: to.Ptr(true),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/install/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(true),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Launch"),
	// 								Action: to.Ptr(armtestbase.ActionLaunch),
	// 								AlwaysRun: to.Ptr(false),
	// 								ApplyUpdateBefore: to.Ptr(true),
	// 								Content: to.Ptr("app/scripts/launch/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Close"),
	// 								Action: to.Ptr(armtestbase.ActionClose),
	// 								AlwaysRun: to.Ptr(false),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/close/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 							},
	// 							{
	// 								Name: to.Ptr("Uninstall"),
	// 								Action: to.Ptr(armtestbase.ActionUninstall),
	// 								AlwaysRun: to.Ptr(true),
	// 								ApplyUpdateBefore: to.Ptr(false),
	// 								Content: to.Ptr("app/scripts/uninstall/job.ps1"),
	// 								ContentType: to.Ptr(armtestbase.ContentTypePath),
	// 								MaxRunTime: to.Ptr[int32](1800),
	// 								RestartAfter: to.Ptr(false),
	// 								RunAsInteractive: to.Ptr(true),
	// 								RunElevated: to.Ptr(true),
	// 						}},
	// 				}},
	// 				ValidationResults: []*armtestbase.PackageValidationResult{
	// 					{
	// 						IsValid: to.Ptr(true),
	// 						ValidationName: to.Ptr("Syntax Validation"),
	// 					},
	// 					{
	// 						IsValid: to.Ptr(true),
	// 						ValidationName: to.Ptr("Package Run Validation"),
	// 				}},
	// 				Version: to.Ptr("1.0.0"),
	// 			},
	// 		}
}
Output:

func (*PackagesClient) GetDownloadURL

func (client *PackagesClient) GetDownloadURL(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, options *PackagesClientGetDownloadURLOptions) (PackagesClientGetDownloadURLResponse, error)

GetDownloadURL - Gets the download URL of a package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • options - PackagesClientGetDownloadURLOptions contains the optional parameters for the PackagesClient.GetDownloadURL method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/PackageGetDownloadURL.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPackagesClient().GetDownloadURL(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DownloadURLResponse = armtestbase.DownloadURLResponse{
	// 	DownloadURL: to.Ptr("some URL"),
	// 	ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-10T06:00:00.000Z"); return t}()),
	// }
}
Output:

func (*PackagesClient) NewListByTestBaseAccountPager added in v0.4.0

func (client *PackagesClient) NewListByTestBaseAccountPager(resourceGroupName string, testBaseAccountName string, options *PackagesClientListByTestBaseAccountOptions) *runtime.Pager[PackagesClientListByTestBaseAccountResponse]

NewListByTestBaseAccountPager - Lists all the packages under a Test Base Account.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - PackagesClientListByTestBaseAccountOptions contains the optional parameters for the PackagesClient.NewListByTestBaseAccountPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/PackagesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPackagesClient().NewListByTestBaseAccountPager("contoso-rg1", "contoso-testBaseAccount1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PackageListResult = armtestbase.PackageListResult{
		// 	Value: []*armtestbase.PackageResource{
		// 		{
		// 			Name: to.Ptr("contoso-package1"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package1"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armtestbase.PackageProperties{
		// 				ApplicationName: to.Ptr("contoso-package1"),
		// 				BlobPath: to.Ptr("storageAccountPath/package.zip"),
		// 				FlightingRing: to.Ptr("Insider Beta Channel"),
		// 				IsEnabled: to.Ptr(true),
		// 				LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
		// 				PackageStatus: to.Ptr(armtestbase.PackageStatusReady),
		// 				ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
		// 				TargetOSList: []*armtestbase.TargetOSInfo{
		// 					{
		// 						OSUpdateType: to.Ptr("Security updates"),
		// 						TargetOSs: []*string{
		// 							to.Ptr("Windows 10 2004"),
		// 							to.Ptr("Windows 10 1903")},
		// 						},
		// 						{
		// 							OSUpdateType: to.Ptr("Feature updates"),
		// 							TargetOSs: []*string{
		// 								to.Ptr("Windows 10 2004"),
		// 								to.Ptr("Windows 10 1903"),
		// 								to.Ptr("Windows 10 1809")},
		// 						}},
		// 						TestTypes: []*armtestbase.TestType{
		// 							to.Ptr(armtestbase.TestTypeOutOfBoxTest),
		// 							to.Ptr(armtestbase.TestTypeFunctionalTest)},
		// 							Tests: []*armtestbase.Test{
		// 								{
		// 									IsActive: to.Ptr(true),
		// 									TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
		// 									ValidationRunStatus: to.Ptr(armtestbase.ValidationRunStatusPassed),
		// 									Commands: []*armtestbase.Command{
		// 										{
		// 											Name: to.Ptr("Install"),
		// 											Action: to.Ptr(armtestbase.ActionInstall),
		// 											AlwaysRun: to.Ptr(true),
		// 											ApplyUpdateBefore: to.Ptr(false),
		// 											Content: to.Ptr("app/scripts/install/job.ps1"),
		// 											ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 											MaxRunTime: to.Ptr[int32](1800),
		// 											RestartAfter: to.Ptr(true),
		// 											RunAsInteractive: to.Ptr(true),
		// 											RunElevated: to.Ptr(true),
		// 										},
		// 										{
		// 											Name: to.Ptr("Launch"),
		// 											Action: to.Ptr(armtestbase.ActionLaunch),
		// 											AlwaysRun: to.Ptr(false),
		// 											ApplyUpdateBefore: to.Ptr(true),
		// 											Content: to.Ptr("app/scripts/launch/job.ps1"),
		// 											ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 											MaxRunTime: to.Ptr[int32](1800),
		// 											RestartAfter: to.Ptr(false),
		// 											RunAsInteractive: to.Ptr(true),
		// 											RunElevated: to.Ptr(true),
		// 										},
		// 										{
		// 											Name: to.Ptr("Close"),
		// 											Action: to.Ptr(armtestbase.ActionClose),
		// 											AlwaysRun: to.Ptr(false),
		// 											ApplyUpdateBefore: to.Ptr(false),
		// 											Content: to.Ptr("app/scripts/close/job.ps1"),
		// 											ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 											MaxRunTime: to.Ptr[int32](1800),
		// 											RestartAfter: to.Ptr(false),
		// 											RunAsInteractive: to.Ptr(true),
		// 											RunElevated: to.Ptr(true),
		// 										},
		// 										{
		// 											Name: to.Ptr("Uninstall"),
		// 											Action: to.Ptr(armtestbase.ActionUninstall),
		// 											AlwaysRun: to.Ptr(true),
		// 											ApplyUpdateBefore: to.Ptr(false),
		// 											Content: to.Ptr("app/scripts/uninstall/job.ps1"),
		// 											ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 											MaxRunTime: to.Ptr[int32](1800),
		// 											RestartAfter: to.Ptr(false),
		// 											RunAsInteractive: to.Ptr(true),
		// 											RunElevated: to.Ptr(true),
		// 									}},
		// 								},
		// 								{
		// 									IsActive: to.Ptr(true),
		// 									TestType: to.Ptr(armtestbase.TestTypeFunctionalTest),
		// 									ValidationRunStatus: to.Ptr(armtestbase.ValidationRunStatusPassed),
		// 									Commands: []*armtestbase.Command{
		// 										{
		// 											Name: to.Ptr("Custom1"),
		// 											Action: to.Ptr(armtestbase.ActionCustom),
		// 											AlwaysRun: to.Ptr(true),
		// 											ApplyUpdateBefore: to.Ptr(false),
		// 											Content: to.Ptr("app/scripts/custom/custom1.ps1"),
		// 											ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 											MaxRunTime: to.Ptr[int32](1800),
		// 											RestartAfter: to.Ptr(false),
		// 											RunAsInteractive: to.Ptr(true),
		// 											RunElevated: to.Ptr(true),
		// 										},
		// 										{
		// 											Name: to.Ptr("Custom2"),
		// 											Action: to.Ptr(armtestbase.ActionCustom),
		// 											AlwaysRun: to.Ptr(true),
		// 											ApplyUpdateBefore: to.Ptr(true),
		// 											Content: to.Ptr("app/scripts/custom/custom2.ps1"),
		// 											ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 											MaxRunTime: to.Ptr[int32](1800),
		// 											RestartAfter: to.Ptr(false),
		// 											RunAsInteractive: to.Ptr(true),
		// 											RunElevated: to.Ptr(true),
		// 									}},
		// 							}},
		// 							ValidationResults: []*armtestbase.PackageValidationResult{
		// 								{
		// 									IsValid: to.Ptr(true),
		// 									ValidationName: to.Ptr("Syntax Validation"),
		// 								},
		// 								{
		// 									IsValid: to.Ptr(true),
		// 									ValidationName: to.Ptr("Package Run Validation"),
		// 							}},
		// 							Version: to.Ptr("1.0.0"),
		// 						},
		// 					},
		// 					{
		// 						Name: to.Ptr("contoso-package2"),
		// 						Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages"),
		// 						ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2"),
		// 						Location: to.Ptr("westus"),
		// 						Tags: map[string]*string{
		// 						},
		// 						Properties: &armtestbase.PackageProperties{
		// 							ApplicationName: to.Ptr("contoso-package2"),
		// 							BlobPath: to.Ptr("storageAccountPath/package.zip"),
		// 							FlightingRing: to.Ptr("Insider Beta Channel"),
		// 							IsEnabled: to.Ptr(true),
		// 							LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
		// 							PackageStatus: to.Ptr(armtestbase.PackageStatusReady),
		// 							ProvisioningState: to.Ptr(armtestbase.ProvisioningStateSucceeded),
		// 							TargetOSList: []*armtestbase.TargetOSInfo{
		// 								{
		// 									OSUpdateType: to.Ptr("Security updates"),
		// 									TargetOSs: []*string{
		// 										to.Ptr("Windows 10 2004"),
		// 										to.Ptr("Windows 10 1903")},
		// 								}},
		// 								TestTypes: []*armtestbase.TestType{
		// 									to.Ptr(armtestbase.TestTypeOutOfBoxTest)},
		// 									Tests: []*armtestbase.Test{
		// 										{
		// 											IsActive: to.Ptr(true),
		// 											TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
		// 											ValidationRunStatus: to.Ptr(armtestbase.ValidationRunStatusPassed),
		// 											Commands: []*armtestbase.Command{
		// 												{
		// 													Name: to.Ptr("Install"),
		// 													Action: to.Ptr(armtestbase.ActionInstall),
		// 													AlwaysRun: to.Ptr(true),
		// 													ApplyUpdateBefore: to.Ptr(false),
		// 													Content: to.Ptr("app/scripts/install/job.ps1"),
		// 													ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 													MaxRunTime: to.Ptr[int32](1800),
		// 													RestartAfter: to.Ptr(true),
		// 													RunAsInteractive: to.Ptr(true),
		// 													RunElevated: to.Ptr(true),
		// 												},
		// 												{
		// 													Name: to.Ptr("Launch"),
		// 													Action: to.Ptr(armtestbase.ActionLaunch),
		// 													AlwaysRun: to.Ptr(false),
		// 													ApplyUpdateBefore: to.Ptr(true),
		// 													Content: to.Ptr("app/scripts/launch/job.ps1"),
		// 													ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 													MaxRunTime: to.Ptr[int32](1800),
		// 													RestartAfter: to.Ptr(false),
		// 													RunAsInteractive: to.Ptr(true),
		// 													RunElevated: to.Ptr(true),
		// 												},
		// 												{
		// 													Name: to.Ptr("Close"),
		// 													Action: to.Ptr(armtestbase.ActionClose),
		// 													AlwaysRun: to.Ptr(false),
		// 													ApplyUpdateBefore: to.Ptr(false),
		// 													Content: to.Ptr("app/scripts/close/job.ps1"),
		// 													ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 													MaxRunTime: to.Ptr[int32](1800),
		// 													RestartAfter: to.Ptr(false),
		// 													RunAsInteractive: to.Ptr(true),
		// 													RunElevated: to.Ptr(true),
		// 												},
		// 												{
		// 													Name: to.Ptr("Uninstall"),
		// 													Action: to.Ptr(armtestbase.ActionUninstall),
		// 													AlwaysRun: to.Ptr(true),
		// 													ApplyUpdateBefore: to.Ptr(false),
		// 													Content: to.Ptr("app/scripts/uninstall/job.ps1"),
		// 													ContentType: to.Ptr(armtestbase.ContentTypePath),
		// 													MaxRunTime: to.Ptr[int32](1800),
		// 													RestartAfter: to.Ptr(false),
		// 													RunAsInteractive: to.Ptr(true),
		// 													RunElevated: to.Ptr(true),
		// 											}},
		// 									}},
		// 									ValidationResults: []*armtestbase.PackageValidationResult{
		// 										{
		// 											IsValid: to.Ptr(true),
		// 											ValidationName: to.Ptr("Syntax Validation"),
		// 										},
		// 										{
		// 											IsValid: to.Ptr(true),
		// 											ValidationName: to.Ptr("Package Run Validation"),
		// 									}},
		// 									Version: to.Ptr("1.0.0"),
		// 								},
		// 						}},
		// 					}
	}
}
Output:

type PackagesClientBeginCreateOptions added in v0.2.0

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

PackagesClientBeginCreateOptions contains the optional parameters for the PackagesClient.BeginCreate method.

type PackagesClientBeginDeleteOptions added in v0.2.0

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

PackagesClientBeginDeleteOptions contains the optional parameters for the PackagesClient.BeginDelete method.

type PackagesClientBeginHardDeleteOptions added in v0.2.0

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

PackagesClientBeginHardDeleteOptions contains the optional parameters for the PackagesClient.BeginHardDelete method.

type PackagesClientBeginUpdateOptions added in v0.2.0

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

PackagesClientBeginUpdateOptions contains the optional parameters for the PackagesClient.BeginUpdate method.

type PackagesClientCreateResponse added in v0.2.0

type PackagesClientCreateResponse struct {
	// The Test Base Package resource.
	PackageResource
}

PackagesClientCreateResponse contains the response from method PackagesClient.BeginCreate.

type PackagesClientDeleteResponse added in v0.2.0

type PackagesClientDeleteResponse struct {
}

PackagesClientDeleteResponse contains the response from method PackagesClient.BeginDelete.

type PackagesClientGetDownloadURLOptions added in v0.2.0

type PackagesClientGetDownloadURLOptions struct {
}

PackagesClientGetDownloadURLOptions contains the optional parameters for the PackagesClient.GetDownloadURL method.

type PackagesClientGetDownloadURLResponse added in v0.2.0

type PackagesClientGetDownloadURLResponse struct {
	// The response of getting a download URL.
	DownloadURLResponse
}

PackagesClientGetDownloadURLResponse contains the response from method PackagesClient.GetDownloadURL.

type PackagesClientGetOptions added in v0.2.0

type PackagesClientGetOptions struct {
}

PackagesClientGetOptions contains the optional parameters for the PackagesClient.Get method.

type PackagesClientGetResponse added in v0.2.0

type PackagesClientGetResponse struct {
	// The Test Base Package resource.
	PackageResource
}

PackagesClientGetResponse contains the response from method PackagesClient.Get.

type PackagesClientHardDeleteResponse added in v0.2.0

type PackagesClientHardDeleteResponse struct {
}

PackagesClientHardDeleteResponse contains the response from method PackagesClient.BeginHardDelete.

type PackagesClientListByTestBaseAccountOptions added in v0.2.0

type PackagesClientListByTestBaseAccountOptions struct {
}

PackagesClientListByTestBaseAccountOptions contains the optional parameters for the PackagesClient.NewListByTestBaseAccountPager method.

type PackagesClientListByTestBaseAccountResponse added in v0.2.0

type PackagesClientListByTestBaseAccountResponse struct {
	// A list of Test Base Packages.
	PackageListResult
}

PackagesClientListByTestBaseAccountResponse contains the response from method PackagesClient.NewListByTestBaseAccountPager.

type PackagesClientUpdateResponse added in v0.2.0

type PackagesClientUpdateResponse struct {
	// The Test Base Package resource.
	PackageResource
}

PackagesClientUpdateResponse contains the response from method PackagesClient.BeginUpdate.

type ProvisioningState

type ProvisioningState string

ProvisioningState - ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property

const (
	ProvisioningStateCancelled ProvisioningState = "Cancelled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

ProxyResource - The resource model definition for an ARM proxy resource. It will have everything other than required location and tags

func (ProxyResource) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type Reason

type Reason string

Reason - The reason for unavailability of a name. Required if nameAvailable == false.

const (
	ReasonAlreadyExists Reason = "AlreadyExists"
	ReasonInvalid       Reason = "Invalid"
)

func PossibleReasonValues

func PossibleReasonValues() []Reason

PossibleReasonValues returns the possible values for the Reason const type.

type RegressionResult

type RegressionResult struct {
	// Message that facilitates debugging a particular regression, if any was inferred.
	Details *string

	// Difference between the two datasets being analyzed.
	Diff *float64

	// FileName of the binary being analyzed.
	FileName *string

	// The grade of the test.
	Grade *Grade

	// Indicates if a regression was inferred.
	IsRegressed *bool
}

RegressionResult - The regression result.

func (RegressionResult) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type RegressionResult.

func (*RegressionResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type RegressionResult.

type RegressionTestDetails

type RegressionTestDetails struct {
	// Difference between the two datasets being analyzed.
	Diff *float64

	// Indicates if a regression was inferred.
	IsRegressed *bool
}

RegressionTestDetails - The details of a regression test.

func (RegressionTestDetails) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type RegressionTestDetails.

func (*RegressionTestDetails) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type RegressionTestDetails.

type ReliabilityResult

type ReliabilityResult struct {
	// Count of number of crashes.
	CrashCount *int32

	// The statistic regression grade for crash signal.
	CrashRegressionGrade *Grade

	// Details related to the crash regression analysis.
	CrashRegressionTestDetails *RegressionTestDetails

	// File name.
	FileName *string

	// Count of number of hangs.
	HangCount *int32

	// The statistic regression grade for hang signal.
	HangRegressionGrade *Grade

	// Details related to the hang regression analysis.
	HangRegressionTestDetails *RegressionTestDetails

	// Count of number of launches.
	LaunchCount *int32

	// The regression grade.
	RegressionGrade *Grade
}

ReliabilityResult - The Reliability Result.

func (ReliabilityResult) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ReliabilityResult.

func (*ReliabilityResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ReliabilityResult.

type ReliabilityResultSingletonResourceProperties

type ReliabilityResultSingletonResourceProperties struct {
	// REQUIRED; Type of the Analysis Result.
	AnalysisResultType *AnalysisResultType

	// The grade of the test.
	Grade *Grade

	// The result array data.
	ReliabilityResults []*ReliabilityResult
}

ReliabilityResultSingletonResourceProperties - The properties of Reliability Result.

func (*ReliabilityResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties added in v0.2.0

func (r *ReliabilityResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties

GetAnalysisResultSingletonResourceProperties implements the AnalysisResultSingletonResourcePropertiesClassification interface for type ReliabilityResultSingletonResourceProperties.

func (ReliabilityResultSingletonResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ReliabilityResultSingletonResourceProperties.

func (*ReliabilityResultSingletonResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ReliabilityResultSingletonResourceProperties.

type Resource

type Resource struct {
	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

Resource - The Resource definition.

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type SKUsClient

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

SKUsClient contains the methods for the SKUs group. Don't use this type directly, use NewSKUsClient() instead.

func NewSKUsClient

func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error)

NewSKUsClient creates a new instance of SKUsClient with the specified values.

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

func (*SKUsClient) NewListPager added in v0.4.0

func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]

NewListPager - Lists the available SKUs of Test Base Account in a subscription.

Generated from API version 2020-12-16-preview

  • options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountSKUsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSKUsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AccountSKUListResult = armtestbase.AccountSKUListResult{
		// 	Value: []*armtestbase.AccountSKU{
		// 		{
		// 			Name: to.Ptr("S0"),
		// 			Capabilities: []*armtestbase.AccountSKUCapability{
		// 			},
		// 			Locations: []*string{
		// 				to.Ptr("global")},
		// 				ResourceType: to.Ptr("testBaseAccounts"),
		// 				Tier: to.Ptr(armtestbase.TierStandard),
		// 			},
		// 			{
		// 				Name: to.Ptr("S0"),
		// 				Capabilities: []*armtestbase.AccountSKUCapability{
		// 				},
		// 				Locations: []*string{
		// 					to.Ptr("global")},
		// 					ResourceType: to.Ptr("testBaseAccounts"),
		// 					Tier: to.Ptr(armtestbase.TierStandard),
		// 			}},
		// 		}
	}
}
Output:

type SKUsClientListOptions added in v0.2.0

type SKUsClientListOptions struct {
}

SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.

type SKUsClientListResponse added in v0.2.0

type SKUsClientListResponse struct {
	// A list of Test Base Account SKUs.
	AccountSKUListResult
}

SKUsClientListResponse contains the response from method SKUsClient.NewListPager.

type ScriptExecutionResult

type ScriptExecutionResult struct {
	// End time of script execution.
	EndTime *time.Time

	// Exit code.
	ExitCode *int32

	// Name of script.
	ScriptName *string

	// Start time of script execution.
	StartTime *time.Time

	// Whether the script execution is timed out.
	TimedOut *bool
}

ScriptExecutionResult - The Script Execution Result.

func (ScriptExecutionResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptExecutionResult.

func (*ScriptExecutionResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptExecutionResult.

type ScriptExecutionResultSingletonResourceProperties

type ScriptExecutionResultSingletonResourceProperties struct {
	// REQUIRED; Type of the Analysis Result.
	AnalysisResultType *AnalysisResultType

	// The grade of the test.
	Grade *Grade

	// The result array data.
	ScriptExecutionResults []*ScriptExecutionResult
}

ScriptExecutionResultSingletonResourceProperties - The properties of Script Execution Result.

func (*ScriptExecutionResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties added in v0.2.0

func (s *ScriptExecutionResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties

GetAnalysisResultSingletonResourceProperties implements the AnalysisResultSingletonResourcePropertiesClassification interface for type ScriptExecutionResultSingletonResourceProperties.

func (ScriptExecutionResultSingletonResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ScriptExecutionResultSingletonResourceProperties.

func (*ScriptExecutionResultSingletonResourceProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ScriptExecutionResultSingletonResourceProperties.

type SubscriptionReceiverValue

type SubscriptionReceiverValue struct {
	// The role of the notification receiver.
	Role *string

	// The subscription id of the notification receiver.
	SubscriptionID *string

	// The subscription name of the notification receiver.
	SubscriptionName *string
}

SubscriptionReceiverValue - The subscription role receiver value.

func (SubscriptionReceiverValue) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type SubscriptionReceiverValue.

func (*SubscriptionReceiverValue) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionReceiverValue.

type SystemData

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

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

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

	// The type of identity that last modified the resource.
	LastModifiedAt *time.Time

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

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

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

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TargetOSInfo

type TargetOSInfo struct {
	// REQUIRED; Specifies the OS update type to test against, e.g., 'Security updates' or 'Feature updates'.
	OSUpdateType *string

	// REQUIRED; Specifies the target OSs to be tested.
	TargetOSs []*string
}

TargetOSInfo - The information of the target OS to be tested.

func (TargetOSInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TargetOSInfo.

func (*TargetOSInfo) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TargetOSInfo.

type Test

type Test struct {
	// REQUIRED; The commands used in the test.
	Commands []*Command

	// REQUIRED; The type of the test.
	TestType *TestType

	// Indicates if this test is active.It doesn't schedule test for not active Test.
	IsActive *bool

	// READ-ONLY; The status of the validation run of the package.
	ValidationRunStatus *ValidationRunStatus
}

Test - The definition of a Test.

func (Test) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Test.

func (*Test) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Test.

type TestAnalysisResult

type TestAnalysisResult struct {
	// The data to provide more failure analysis information.
	BlobData *string

	// The array of identified failures.
	IdentifiedFailures []*IdentifiedFailure

	// The status of the analysis.
	TestAnalysisStatus *TestAnalysisStatus
}

TestAnalysisResult - The test analysis result.

func (TestAnalysisResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestAnalysisResult.

func (*TestAnalysisResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestAnalysisResult.

type TestAnalysisResultSingletonResourceProperties

type TestAnalysisResultSingletonResourceProperties struct {
	// REQUIRED; Type of the Analysis Result.
	AnalysisResultType *AnalysisResultType

	// The grade of the test.
	Grade *Grade

	// The result of test analysis.
	TestAnalysisResult *TestAnalysisResult
}

TestAnalysisResultSingletonResourceProperties - The properties of Test Analysis Result.

func (*TestAnalysisResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties added in v0.2.0

func (t *TestAnalysisResultSingletonResourceProperties) GetAnalysisResultSingletonResourceProperties() *AnalysisResultSingletonResourceProperties

GetAnalysisResultSingletonResourceProperties implements the AnalysisResultSingletonResourcePropertiesClassification interface for type TestAnalysisResultSingletonResourceProperties.

func (TestAnalysisResultSingletonResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type TestAnalysisResultSingletonResourceProperties.

func (*TestAnalysisResultSingletonResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestAnalysisResultSingletonResourceProperties.

type TestAnalysisStatus

type TestAnalysisStatus string

TestAnalysisStatus - The status of the analysis.

const (
	TestAnalysisStatusAnalyzing TestAnalysisStatus = "Analyzing"
	TestAnalysisStatusCompleted TestAnalysisStatus = "Completed"
	TestAnalysisStatusFailed    TestAnalysisStatus = "Failed"
	TestAnalysisStatusNone      TestAnalysisStatus = "None"
)

func PossibleTestAnalysisStatusValues

func PossibleTestAnalysisStatusValues() []TestAnalysisStatus

PossibleTestAnalysisStatusValues returns the possible values for the TestAnalysisStatus const type.

type TestResultAnalysisSummary

type TestResultAnalysisSummary struct {
	// The analysis status.
	AnalysisStatus *AnalysisStatus

	// The grade of the test result.
	Grade *Grade

	// Metric name
	Name *string
}

TestResultAnalysisSummary - The summary of a Test Analysis Result.

func (TestResultAnalysisSummary) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type TestResultAnalysisSummary.

func (*TestResultAnalysisSummary) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestResultAnalysisSummary.

type TestResultListResult

type TestResultListResult struct {
	// The list of Test Results.
	Value []*TestResultResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

TestResultListResult - A list of Test Results.

func (TestResultListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestResultListResult.

func (*TestResultListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestResultListResult.

type TestResultProperties

type TestResultProperties struct {
	// List of analysis summaries.
	AnalysisSummaries []*TestResultAnalysisSummary

	// Application name.
	ApplicationName *string

	// Application version.
	ApplicationVersion *string

	// Azure Id of the baseline test result.
	BaselineTestResultID *string

	// The build revision of the tested release (OS update).
	BuildRevision *string

	// The build version of the tested release (OS update).
	BuildVersion *string

	// The execution status of the test.
	ExecutionStatus *ExecutionStatus

	// The flighting ring, only for release of feature updates.
	FlightingRing *string

	// The grade of the test.
	Grade *Grade

	// Whether download data is available.
	IsDownloadDataAvailable *bool

	// Whether video data is available.
	IsVideoAvailable *bool

	// KB number.
	KbNumber *string

	// The operating system name, e.g. Windows 10 1809.
	OSName *string

	// Resource Id of the package.
	PackageID *string

	// The version of the Windows update package.
	PackageVersion *string

	// The name of the tested release (OS update).
	ReleaseName *string

	// The release version date of the tested release.
	ReleaseVersionDate *time.Time

	// The run time of the test.
	TestRunTime *string

	// The status of the test.
	TestStatus *TestStatus

	// Test type. E.g. 'Out of box test' or 'Functional test'.
	TestType *string
}

TestResultProperties - The properties of a Test Result.

func (TestResultProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestResultProperties.

func (*TestResultProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestResultProperties.

type TestResultResource

type TestResultResource struct {
	// The properties of a Test Result.
	Properties *TestResultProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

TestResultResource - The Test Result Resource.

func (TestResultResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestResultResource.

func (*TestResultResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestResultResource.

type TestResultsClient

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

TestResultsClient contains the methods for the TestResults group. Don't use this type directly, use NewTestResultsClient() instead.

func NewTestResultsClient

func NewTestResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TestResultsClient, error)

NewTestResultsClient creates a new instance of TestResultsClient with the specified values.

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

func (*TestResultsClient) Get

func (client *TestResultsClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, testResultName string, options *TestResultsClientGetOptions) (TestResultsClientGetResponse, error)

Get - Get the Test Result by Id with specified OS Update type for a Test Base Package. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • testResultName - The Test Result Name. It equals to {osName}-{TestResultId} string.
  • options - TestResultsClientGetOptions contains the optional parameters for the TestResultsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestResultGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTestResultsClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-99b1f80d-03a9-4148-997f-806ba5bac8e0", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TestResultResource = armtestbase.TestResultResource{
	// 	Name: to.Ptr("Windows-10-1909-99b1f80d-03a9-4148-997f-806ba5bac8e0"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-1909-99b1f80d-03a9-4148-997f-806ba5bac8e0"),
	// 	Properties: &armtestbase.TestResultProperties{
	// 		AnalysisSummaries: []*armtestbase.TestResultAnalysisSummary{
	// 			{
	// 				Name: to.Ptr("Memory Regression Analysis Result"),
	// 				AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusSucceeded),
	// 				Grade: to.Ptr(armtestbase.GradePass),
	// 			},
	// 			{
	// 				Name: to.Ptr("CPU Regression Analysis Result"),
	// 				AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusSucceeded),
	// 				Grade: to.Ptr(armtestbase.GradePass),
	// 			},
	// 			{
	// 				Name: to.Ptr("Memory Utilization Analysis Result"),
	// 				AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusSucceeded),
	// 				Grade: to.Ptr(armtestbase.GradePass),
	// 			},
	// 			{
	// 				Name: to.Ptr("CPU Utilization Analysis Result"),
	// 				AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusSucceeded),
	// 				Grade: to.Ptr(armtestbase.GradePass),
	// 		}},
	// 		ApplicationName: to.Ptr("contoso-package2"),
	// 		ApplicationVersion: to.Ptr("1.0.0"),
	// 		BaselineTestResultID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/anotherId"),
	// 		BuildRevision: to.Ptr("505"),
	// 		ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 		Grade: to.Ptr(armtestbase.GradePass),
	// 		IsDownloadDataAvailable: to.Ptr(true),
	// 		KbNumber: to.Ptr("KB1984839"),
	// 		OSName: to.Ptr("Windows 10 1909"),
	// 		PackageID: to.Ptr("b5ed1bcc-e74c-40d8-82f2-1773f616f93e"),
	// 		PackageVersion: to.Ptr("3.0.1"),
	// 		ReleaseName: to.Ptr("2020.12B"),
	// 		ReleaseVersionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-28T17:30:00.000Z"); return t}()),
	// 		TestRunTime: to.Ptr("00:21:30"),
	// 		TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 		TestType: to.Ptr("Out of box test"),
	// 	},
	// }
}
Output:

func (*TestResultsClient) GetDownloadURL

func (client *TestResultsClient) GetDownloadURL(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, testResultName string, options *TestResultsClientGetDownloadURLOptions) (TestResultsClientGetDownloadURLResponse, error)

GetDownloadURL - Gets the download URL of the test result. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • testResultName - The Test Result Name. It equals to {osName}-{TestResultId} string.
  • options - TestResultsClientGetDownloadURLOptions contains the optional parameters for the TestResultsClient.GetDownloadURL method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestResultGetDownloadURL.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTestResultsClient().GetDownloadURL(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-99b1f80d-03a9-4148-997f-806ba5bac8e0", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DownloadURLResponse = armtestbase.DownloadURLResponse{
	// 	DownloadURL: to.Ptr("test result download URL"),
	// 	ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-10T06:00:00.000Z"); return t}()),
	// }
}
Output:

func (*TestResultsClient) GetVideoDownloadURL

func (client *TestResultsClient) GetVideoDownloadURL(ctx context.Context, resourceGroupName string, testBaseAccountName string, packageName string, testResultName string, options *TestResultsClientGetVideoDownloadURLOptions) (TestResultsClientGetVideoDownloadURLResponse, error)

GetVideoDownloadURL - Gets the download URL of the test execution screen recording. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • testResultName - The Test Result Name. It equals to {osName}-{TestResultId} string.
  • options - TestResultsClientGetVideoDownloadURLOptions contains the optional parameters for the TestResultsClient.GetVideoDownloadURL method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestResultGetVideoDownloadURL.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTestResultsClient().GetVideoDownloadURL(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", "Windows-10-1909-99b1f80d-03a9-4148-997f-806ba5bac8e0", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DownloadURLResponse = armtestbase.DownloadURLResponse{
	// 	DownloadURL: to.Ptr("test result video download URL"),
	// 	ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-10T06:00:00.000Z"); return t}()),
	// }
}
Output:

func (*TestResultsClient) NewListPager added in v0.4.0

func (client *TestResultsClient) NewListPager(resourceGroupName string, testBaseAccountName string, packageName string, osUpdateType OsUpdateType, options *TestResultsClientListOptions) *runtime.Pager[TestResultsClientListResponse]

NewListPager - Lists all the Test Results with specified OS Update type for a Test Base Package. Can be filtered by osName, releaseName, flightingRing, buildVersion, buildRevision.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • packageName - The resource name of the Test Base Package.
  • osUpdateType - The type of the OS Update.
  • options - TestResultsClientListOptions contains the optional parameters for the TestResultsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestResultsList.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTestResultsClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", "contoso-package2", armtestbase.OsUpdateTypeSecurityUpdate, &armtestbase.TestResultsClientListOptions{Filter: to.Ptr("osName eq 'Windows 10 2004' and releaseName eq '2020.11B'")})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TestResultListResult = armtestbase.TestResultListResult{
		// 	Value: []*armtestbase.TestResultResource{
		// 		{
		// 			Name: to.Ptr("Windows-10-2004-8e8e3200-284b-4a99-8c30-cb46c54d4c1e"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-2004-8e8e3200-284b-4a99-8c30-cb46c54d4c1e"),
		// 			Properties: &armtestbase.TestResultProperties{
		// 				AnalysisSummaries: []*armtestbase.TestResultAnalysisSummary{
		// 					{
		// 						Name: to.Ptr("Memory Regression Analysis Result"),
		// 						AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusSucceeded),
		// 						Grade: to.Ptr(armtestbase.GradePass),
		// 					},
		// 					{
		// 						Name: to.Ptr("CPU Regression Analysis Result"),
		// 						AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusSucceeded),
		// 						Grade: to.Ptr(armtestbase.GradePass),
		// 					},
		// 					{
		// 						Name: to.Ptr("Memory Utilization Analysis Result"),
		// 						AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusSucceeded),
		// 						Grade: to.Ptr(armtestbase.GradePass),
		// 					},
		// 					{
		// 						Name: to.Ptr("CPU Utilization Analysis Result"),
		// 						AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusSucceeded),
		// 						Grade: to.Ptr(armtestbase.GradePass),
		// 				}},
		// 				ApplicationName: to.Ptr("contoso-package2"),
		// 				ApplicationVersion: to.Ptr("1.0.0"),
		// 				BaselineTestResultID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/anotherId"),
		// 				BuildRevision: to.Ptr("478"),
		// 				ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 				Grade: to.Ptr(armtestbase.GradePass),
		// 				IsDownloadDataAvailable: to.Ptr(true),
		// 				KbNumber: to.Ptr("KB1984839"),
		// 				OSName: to.Ptr("Windows 10 2004"),
		// 				PackageID: to.Ptr("b5ed1bcc-e74c-40d8-82f2-1773f616f93e"),
		// 				PackageVersion: to.Ptr("3.0.1"),
		// 				ReleaseName: to.Ptr("2020.11B"),
		// 				ReleaseVersionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-28T17:30:00.000Z"); return t}()),
		// 				TestRunTime: to.Ptr("00:21:30"),
		// 				TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 				TestType: to.Ptr("Out of box test"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Windows-10-2004-d19baae0-9ab4-432b-a752-878343fa4481"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages/testResults"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/Windows-10-2004-d19baae0-9ab4-432b-a752-878343fa4481"),
		// 			Properties: &armtestbase.TestResultProperties{
		// 				AnalysisSummaries: []*armtestbase.TestResultAnalysisSummary{
		// 					{
		// 						Name: to.Ptr("Memory Regression Analysis Result"),
		// 						AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusNotAvailable),
		// 						Grade: to.Ptr(armtestbase.GradeNotAvailable),
		// 					},
		// 					{
		// 						Name: to.Ptr("CPU Regression Analysis Result"),
		// 						AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusNotAvailable),
		// 						Grade: to.Ptr(armtestbase.GradeNotAvailable),
		// 					},
		// 					{
		// 						Name: to.Ptr("Memory Utilization Analysis Result"),
		// 						AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusNotAvailable),
		// 						Grade: to.Ptr(armtestbase.GradeNotAvailable),
		// 					},
		// 					{
		// 						Name: to.Ptr("CPU Utilization Analysis Result"),
		// 						AnalysisStatus: to.Ptr(armtestbase.AnalysisStatusNotAvailable),
		// 						Grade: to.Ptr(armtestbase.GradeNotAvailable),
		// 				}},
		// 				ApplicationName: to.Ptr("contoso-package2"),
		// 				ApplicationVersion: to.Ptr("1.0.0"),
		// 				BaselineTestResultID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/packages/contoso-package2/testResults/anotherId"),
		// 				BuildRevision: to.Ptr("309"),
		// 				ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusFailed),
		// 				Grade: to.Ptr(armtestbase.GradeFail),
		// 				IsDownloadDataAvailable: to.Ptr(false),
		// 				KbNumber: to.Ptr("KB1784831"),
		// 				OSName: to.Ptr("Windows 10 2004"),
		// 				PackageID: to.Ptr("b5ed1bcc-e74c-40d8-82f2-1773f616f93e"),
		// 				PackageVersion: to.Ptr("3.0.1"),
		// 				ReleaseName: to.Ptr("2020.11B"),
		// 				ReleaseVersionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-28T17:30:00.000Z"); return t}()),
		// 				TestRunTime: to.Ptr("01:00:00"),
		// 				TestStatus: to.Ptr(armtestbase.TestStatusTestFailure),
		// 				TestType: to.Ptr("Out of box test"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type TestResultsClientGetDownloadURLOptions added in v0.2.0

type TestResultsClientGetDownloadURLOptions struct {
}

TestResultsClientGetDownloadURLOptions contains the optional parameters for the TestResultsClient.GetDownloadURL method.

type TestResultsClientGetDownloadURLResponse added in v0.2.0

type TestResultsClientGetDownloadURLResponse struct {
	// The response of getting a download URL.
	DownloadURLResponse
}

TestResultsClientGetDownloadURLResponse contains the response from method TestResultsClient.GetDownloadURL.

type TestResultsClientGetOptions added in v0.2.0

type TestResultsClientGetOptions struct {
}

TestResultsClientGetOptions contains the optional parameters for the TestResultsClient.Get method.

type TestResultsClientGetResponse added in v0.2.0

type TestResultsClientGetResponse struct {
	// The Test Result Resource.
	TestResultResource
}

TestResultsClientGetResponse contains the response from method TestResultsClient.Get.

type TestResultsClientGetVideoDownloadURLOptions added in v0.2.0

type TestResultsClientGetVideoDownloadURLOptions struct {
}

TestResultsClientGetVideoDownloadURLOptions contains the optional parameters for the TestResultsClient.GetVideoDownloadURL method.

type TestResultsClientGetVideoDownloadURLResponse added in v0.2.0

type TestResultsClientGetVideoDownloadURLResponse struct {
	// The response of getting a download URL.
	DownloadURLResponse
}

TestResultsClientGetVideoDownloadURLResponse contains the response from method TestResultsClient.GetVideoDownloadURL.

type TestResultsClientListOptions added in v0.2.0

type TestResultsClientListOptions struct {
	// Odata filter
	Filter *string
}

TestResultsClientListOptions contains the optional parameters for the TestResultsClient.NewListPager method.

type TestResultsClientListResponse added in v0.2.0

type TestResultsClientListResponse struct {
	// A list of Test Results.
	TestResultListResult
}

TestResultsClientListResponse contains the response from method TestResultsClient.NewListPager.

type TestStatus

type TestStatus string

TestStatus - The status of a test.

const (
	TestStatusCompleted               TestStatus = "Completed"
	TestStatusDataProcessing          TestStatus = "DataProcessing"
	TestStatusInfrastructureFailure   TestStatus = "InfrastructureFailure"
	TestStatusNone                    TestStatus = "None"
	TestStatusTestAndUpdateFailure    TestStatus = "TestAndUpdateFailure"
	TestStatusTestExecutionInProgress TestStatus = "TestExecutionInProgress"
	TestStatusTestFailure             TestStatus = "TestFailure"
	TestStatusUpdateFailure           TestStatus = "UpdateFailure"
)

func PossibleTestStatusValues

func PossibleTestStatusValues() []TestStatus

PossibleTestStatusValues returns the possible values for the TestStatus const type.

type TestSummariesClient

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

TestSummariesClient contains the methods for the TestSummaries group. Don't use this type directly, use NewTestSummariesClient() instead.

func NewTestSummariesClient

func NewTestSummariesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TestSummariesClient, error)

NewTestSummariesClient creates a new instance of TestSummariesClient with the specified values.

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

func (*TestSummariesClient) Get

func (client *TestSummariesClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, testSummaryName string, options *TestSummariesClientGetOptions) (TestSummariesClientGetResponse, error)

Get - Gets a Test Summary with specific name from all the Test Summaries of all the packages under a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • testSummaryName - The name of the Test Summary.
  • options - TestSummariesClientGetOptions contains the optional parameters for the TestSummariesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestSummaryGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTestSummariesClient().Get(ctx, "contoso-rg1", "contoso-testBaseAccount1", "contoso-package2-096bffb5-5d3d-4305-a66a-953372ed6e88", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TestSummaryResource = armtestbase.TestSummaryResource{
	// 	Name: to.Ptr("contoso-package2-096bffb5-5d3d-4305-a66a-953372ed6e88"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/testSummaries"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/testSummaries/contoso-package2-096bffb5-5d3d-4305-a66a-953372ed6e88"),
	// 	Properties: &armtestbase.TestSummaryProperties{
	// 		ApplicationName: to.Ptr("contoso-package2"),
	// 		ApplicationVersion: to.Ptr("1.0.0"),
	// 		ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 		FeatureUpdatesTestSummary: &armtestbase.OSUpdatesTestSummary{
	// 			ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 			Grade: to.Ptr(armtestbase.GradePass),
	// 			OSUpdateTestSummaries: []*armtestbase.OSUpdateTestSummary{
	// 				{
	// 					BuildVersion: to.Ptr("513"),
	// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 					Grade: to.Ptr(armtestbase.GradePass),
	// 					OSName: to.Ptr("Windows 10 1909"),
	// 					ReleaseName: to.Ptr("2020.12.B"),
	// 					TestRunTime: to.Ptr("00:43:21"),
	// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 					TestType: to.Ptr("OutOfBoxTest"),
	// 				},
	// 				{
	// 					BuildVersion: to.Ptr("765"),
	// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 					Grade: to.Ptr(armtestbase.GradePass),
	// 					OSName: to.Ptr("Windows 10 1903"),
	// 					ReleaseName: to.Ptr("2020.11.B"),
	// 					TestRunTime: to.Ptr("00:13:28"),
	// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 					TestType: to.Ptr("OutOfBoxTest"),
	// 				},
	// 				{
	// 					BuildVersion: to.Ptr("313"),
	// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 					Grade: to.Ptr(armtestbase.GradePass),
	// 					OSName: to.Ptr("Windows 10 1809"),
	// 					ReleaseName: to.Ptr("2020.11.B"),
	// 					TestRunTime: to.Ptr("00:42:08"),
	// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 					TestType: to.Ptr("OutOfBoxTest"),
	// 			}},
	// 			TestRunTime: to.Ptr("00:33:21"),
	// 			TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 		},
	// 		Grade: to.Ptr(armtestbase.GradePass),
	// 		PackageID: to.Ptr("b5ed1bcc-e74c-40d8-82f2-1773f616f93e"),
	// 		SecurityUpdatesTestSummary: &armtestbase.OSUpdatesTestSummary{
	// 			ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 			Grade: to.Ptr(armtestbase.GradePass),
	// 			OSUpdateTestSummaries: []*armtestbase.OSUpdateTestSummary{
	// 				{
	// 					BuildVersion: to.Ptr("513"),
	// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 					Grade: to.Ptr(armtestbase.GradePass),
	// 					OSName: to.Ptr("Windows 10 1909"),
	// 					ReleaseName: to.Ptr("2020.12.B"),
	// 					TestRunTime: to.Ptr("00:43:21"),
	// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 					TestType: to.Ptr("OutOfBoxTest"),
	// 				},
	// 				{
	// 					BuildVersion: to.Ptr("765"),
	// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 					Grade: to.Ptr(armtestbase.GradePass),
	// 					OSName: to.Ptr("Windows 10 1903"),
	// 					ReleaseName: to.Ptr("2020.11.B"),
	// 					TestRunTime: to.Ptr("00:13:28"),
	// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 					TestType: to.Ptr("OutOfBoxTest"),
	// 				},
	// 				{
	// 					BuildVersion: to.Ptr("313"),
	// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
	// 					Grade: to.Ptr(armtestbase.GradePass),
	// 					OSName: to.Ptr("Windows 10 1809"),
	// 					ReleaseName: to.Ptr("2020.11.B"),
	// 					TestRunTime: to.Ptr("00:42:08"),
	// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 					TestType: to.Ptr("OutOfBoxTest"),
	// 			}},
	// 			TestRunTime: to.Ptr("00:43:21"),
	// 			TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 		},
	// 		TestRunTime: to.Ptr("00:43:21"),
	// 		TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
	// 		TestSummaryID: to.Ptr("096bffb5-5d3d-4305-a66a-953372ed6e88"),
	// 	},
	// }
}
Output:

func (*TestSummariesClient) NewListPager added in v0.4.0

func (client *TestSummariesClient) NewListPager(resourceGroupName string, testBaseAccountName string, options *TestSummariesClientListOptions) *runtime.Pager[TestSummariesClientListResponse]

NewListPager - Lists the Test Summaries of all the packages under a Test Base Account.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - TestSummariesClientListOptions contains the optional parameters for the TestSummariesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestSummariesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTestSummariesClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TestSummaryListResult = armtestbase.TestSummaryListResult{
		// 	Value: []*armtestbase.TestSummaryResource{
		// 		{
		// 			Name: to.Ptr("contoso-package1-38960b32-3541-4cf1-8ccc-fd22774395cc"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/testSummaries"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/testSummaries/contoso-package1-38960b32-3541-4cf1-8ccc-fd22774395cc"),
		// 			Properties: &armtestbase.TestSummaryProperties{
		// 				ApplicationName: to.Ptr("contoso-package1"),
		// 				ApplicationVersion: to.Ptr("1.0.0"),
		// 				ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 				FeatureUpdatesTestSummary: &armtestbase.OSUpdatesTestSummary{
		// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 					Grade: to.Ptr(armtestbase.GradePass),
		// 					OSUpdateTestSummaries: []*armtestbase.OSUpdateTestSummary{
		// 						{
		// 							BuildVersion: to.Ptr("513"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1909"),
		// 							ReleaseName: to.Ptr("2020.12.B"),
		// 							TestRunTime: to.Ptr("00:43:21"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("OutOfBoxTest"),
		// 						},
		// 						{
		// 							BuildVersion: to.Ptr("765"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1903"),
		// 							ReleaseName: to.Ptr("2020.11.B"),
		// 							TestRunTime: to.Ptr("00:13:28"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("OutOfBoxTest"),
		// 						},
		// 						{
		// 							BuildVersion: to.Ptr("313"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1809"),
		// 							ReleaseName: to.Ptr("2020.11.B"),
		// 							TestRunTime: to.Ptr("00:42:08"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("OutOfBoxTest"),
		// 					}},
		// 					TestRunTime: to.Ptr("00:33:21"),
		// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 				},
		// 				Grade: to.Ptr(armtestbase.GradePass),
		// 				PackageID: to.Ptr("57199102-9738-42e0-9fec-db7709d62a71"),
		// 				SecurityUpdatesTestSummary: &armtestbase.OSUpdatesTestSummary{
		// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 					Grade: to.Ptr(armtestbase.GradePass),
		// 					OSUpdateTestSummaries: []*armtestbase.OSUpdateTestSummary{
		// 						{
		// 							BuildVersion: to.Ptr("513"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1909"),
		// 							ReleaseName: to.Ptr("2020.12.B"),
		// 							TestRunTime: to.Ptr("00:43:21"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("OutOfBoxTest"),
		// 						},
		// 						{
		// 							BuildVersion: to.Ptr("765"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1903"),
		// 							ReleaseName: to.Ptr("2020.11.B"),
		// 							TestRunTime: to.Ptr("00:13:28"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("OutOfBoxTest"),
		// 						},
		// 						{
		// 							BuildVersion: to.Ptr("313"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1809"),
		// 							ReleaseName: to.Ptr("2020.11.B"),
		// 							TestRunTime: to.Ptr("00:42:08"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("OutOfBoxTest"),
		// 					}},
		// 					TestRunTime: to.Ptr("00:43:21"),
		// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 				},
		// 				TestRunTime: to.Ptr("00:43:21"),
		// 				TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 				TestSummaryID: to.Ptr("38960b32-3541-4cf1-8ccc-fd22774395cc"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("contoso-package2-096bffb5-5d3d-4305-a66a-953372ed6e88"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/testSummaries"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/testSummaries/contoso-package2-096bffb5-5d3d-4305-a66a-953372ed6e88"),
		// 			Properties: &armtestbase.TestSummaryProperties{
		// 				ApplicationName: to.Ptr("contoso-package2"),
		// 				ApplicationVersion: to.Ptr("1.0.0"),
		// 				ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 				FeatureUpdatesTestSummary: &armtestbase.OSUpdatesTestSummary{
		// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 					Grade: to.Ptr(armtestbase.GradePass),
		// 					OSUpdateTestSummaries: []*armtestbase.OSUpdateTestSummary{
		// 						{
		// 							BuildVersion: to.Ptr("513"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1909"),
		// 							ReleaseName: to.Ptr("2020.12.B"),
		// 							TestRunTime: to.Ptr("00:43:21"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("FunctionalTest"),
		// 						},
		// 						{
		// 							BuildVersion: to.Ptr("765"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1903"),
		// 							ReleaseName: to.Ptr("2020.11.B"),
		// 							TestRunTime: to.Ptr("00:13:28"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("FunctionalTest"),
		// 						},
		// 						{
		// 							BuildVersion: to.Ptr("313"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1809"),
		// 							ReleaseName: to.Ptr("2020.11.B"),
		// 							TestRunTime: to.Ptr("00:42:08"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("FunctionalTest"),
		// 					}},
		// 					TestRunTime: to.Ptr("00:33:21"),
		// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 				},
		// 				Grade: to.Ptr(armtestbase.GradePass),
		// 				PackageID: to.Ptr("b5ed1bcc-e74c-40d8-82f2-1773f616f93e"),
		// 				SecurityUpdatesTestSummary: &armtestbase.OSUpdatesTestSummary{
		// 					ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 					Grade: to.Ptr(armtestbase.GradePass),
		// 					OSUpdateTestSummaries: []*armtestbase.OSUpdateTestSummary{
		// 						{
		// 							BuildVersion: to.Ptr("513"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1909"),
		// 							ReleaseName: to.Ptr("2020.12.B"),
		// 							TestRunTime: to.Ptr("00:43:21"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("FunctionalTest"),
		// 						},
		// 						{
		// 							BuildVersion: to.Ptr("765"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1903"),
		// 							ReleaseName: to.Ptr("2020.11.B"),
		// 							TestRunTime: to.Ptr("00:13:28"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("FunctionalTest"),
		// 						},
		// 						{
		// 							BuildVersion: to.Ptr("313"),
		// 							ExecutionStatus: to.Ptr(armtestbase.ExecutionStatusSucceeded),
		// 							Grade: to.Ptr(armtestbase.GradePass),
		// 							OSName: to.Ptr("Windows 10 1809"),
		// 							ReleaseName: to.Ptr("2020.11.B"),
		// 							TestRunTime: to.Ptr("00:42:08"),
		// 							TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 							TestType: to.Ptr("FunctionalTest"),
		// 					}},
		// 					TestRunTime: to.Ptr("00:43:21"),
		// 					TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 				},
		// 				TestRunTime: to.Ptr("00:43:21"),
		// 				TestStatus: to.Ptr(armtestbase.TestStatusCompleted),
		// 				TestSummaryID: to.Ptr("096bffb5-5d3d-4305-a66a-953372ed6e88"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type TestSummariesClientGetOptions added in v0.2.0

type TestSummariesClientGetOptions struct {
}

TestSummariesClientGetOptions contains the optional parameters for the TestSummariesClient.Get method.

type TestSummariesClientGetResponse added in v0.2.0

type TestSummariesClientGetResponse struct {
	// Summary of a Test.
	TestSummaryResource
}

TestSummariesClientGetResponse contains the response from method TestSummariesClient.Get.

type TestSummariesClientListOptions added in v0.2.0

type TestSummariesClientListOptions struct {
}

TestSummariesClientListOptions contains the optional parameters for the TestSummariesClient.NewListPager method.

type TestSummariesClientListResponse added in v0.2.0

type TestSummariesClientListResponse struct {
	// A list of Test Summaries.
	TestSummaryListResult
}

TestSummariesClientListResponse contains the response from method TestSummariesClient.NewListPager.

type TestSummaryListResult

type TestSummaryListResult struct {
	// The list of Test Summaries.
	Value []*TestSummaryResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

TestSummaryListResult - A list of Test Summaries.

func (TestSummaryListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestSummaryListResult.

func (*TestSummaryListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestSummaryListResult.

type TestSummaryProperties

type TestSummaryProperties struct {
	// Application name.
	ApplicationName *string

	// Application version.
	ApplicationVersion *string

	// The execution status of last test.
	ExecutionStatus *ExecutionStatus

	// The result summary of tests triggered by feature updates
	FeatureUpdatesTestSummary *OSUpdatesTestSummary

	// The grade of the test.
	Grade *Grade

	// The Azure resource Id of package.
	PackageID *string

	// The result summary of tests triggered by security updates
	SecurityUpdatesTestSummary *OSUpdatesTestSummary

	// The run time of the last test.
	TestRunTime *string

	// The status of last test.
	TestStatus *TestStatus

	// The Id of the current Test Summary.
	TestSummaryID *string
}

TestSummaryProperties - Properties of a Test Summary.

func (TestSummaryProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type TestSummaryProperties.

func (*TestSummaryProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestSummaryProperties.

type TestSummaryResource

type TestSummaryResource struct {
	// Properties of a Test Summary.
	Properties *TestSummaryProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

TestSummaryResource - Summary of a Test.

func (TestSummaryResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestSummaryResource.

func (*TestSummaryResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestSummaryResource.

type TestType

type TestType string

TestType - The test type.

const (
	TestTypeFunctionalTest TestType = "FunctionalTest"
	TestTypeOutOfBoxTest   TestType = "OutOfBoxTest"
)

func PossibleTestTypeValues

func PossibleTestTypeValues() []TestType

PossibleTestTypeValues returns the possible values for the TestType const type.

type TestTypeListResult

type TestTypeListResult struct {
	// The list of test types.
	Value []*TestTypeResource

	// READ-ONLY; Link to the next set of results. Not empty if value contains incomplete list of results.
	NextLink *string
}

TestTypeListResult - A list of test types.

func (TestTypeListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestTypeListResult.

func (*TestTypeListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestTypeListResult.

type TestTypeProperties

type TestTypeProperties struct {
	// The actual name of a test type of a Test Base Account.
	ActualTestTypeName *string
}

TestTypeProperties - The Test Type properties.

func (TestTypeProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type TestTypeProperties.

func (*TestTypeProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestTypeProperties.

type TestTypeResource

type TestTypeResource struct {
	// Test Type properties.
	Properties *TestTypeProperties

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; The system metadata relating to this resource
	SystemData *SystemData

	// READ-ONLY; Resource type.
	Type *string
}

TestTypeResource - The test type resource.

func (TestTypeResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestTypeResource.

func (*TestTypeResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestTypeResource.

type TestTypesClient

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

TestTypesClient contains the methods for the TestTypes group. Don't use this type directly, use NewTestTypesClient() instead.

func NewTestTypesClient

func NewTestTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TestTypesClient, error)

NewTestTypesClient creates a new instance of TestTypesClient with the specified values.

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

func (*TestTypesClient) Get

func (client *TestTypesClient) Get(ctx context.Context, resourceGroupName string, testBaseAccountName string, testTypeResourceName string, options *TestTypesClientGetOptions) (TestTypesClientGetResponse, error)

Get - Gets a test type of a Test Base Account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • testTypeResourceName - The resource name of a test type.
  • options - TestTypesClientGetOptions contains the optional parameters for the TestTypesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestTypeGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTestTypesClient().Get(ctx, "contoso-rg", "contoso-testBaseAccount", "Functional-Test", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TestTypeResource = armtestbase.TestTypeResource{
	// 	Name: to.Ptr("Functional-Test"),
	// 	Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/testTypes"),
	// 	ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/testTypes/Functional-Test"),
	// 	Properties: &armtestbase.TestTypeProperties{
	// 		ActualTestTypeName: to.Ptr("Functional Test"),
	// 	},
	// }
}
Output:

func (*TestTypesClient) NewListPager added in v0.4.0

func (client *TestTypesClient) NewListPager(resourceGroupName string, testBaseAccountName string, options *TestTypesClientListOptions) *runtime.Pager[TestTypesClientListResponse]

NewListPager - Lists all the test types of a Test Base Account.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - TestTypesClientListOptions contains the optional parameters for the TestTypesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestTypesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTestTypesClient().NewListPager("contoso-rg", "contoso-testBaseAccount", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TestTypeListResult = armtestbase.TestTypeListResult{
		// 	Value: []*armtestbase.TestTypeResource{
		// 		{
		// 			Name: to.Ptr("Functional-Test"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/testTypes"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/testTypes/Functional-Test"),
		// 			Properties: &armtestbase.TestTypeProperties{
		// 				ActualTestTypeName: to.Ptr("Functional Test"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Out-of-Box-Test"),
		// 			Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/testTypes"),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount/testTypes/Out-of-Box-Test"),
		// 			Properties: &armtestbase.TestTypeProperties{
		// 				ActualTestTypeName: to.Ptr("Out of Box Test"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type TestTypesClientGetOptions added in v0.2.0

type TestTypesClientGetOptions struct {
}

TestTypesClientGetOptions contains the optional parameters for the TestTypesClient.Get method.

type TestTypesClientGetResponse added in v0.2.0

type TestTypesClientGetResponse struct {
	// The test type resource.
	TestTypeResource
}

TestTypesClientGetResponse contains the response from method TestTypesClient.Get.

type TestTypesClientListOptions added in v0.2.0

type TestTypesClientListOptions struct {
}

TestTypesClientListOptions contains the optional parameters for the TestTypesClient.NewListPager method.

type TestTypesClientListResponse added in v0.2.0

type TestTypesClientListResponse struct {
	// A list of test types.
	TestTypeListResult
}

TestTypesClientListResponse contains the response from method TestTypesClient.NewListPager.

type Tier

type Tier string

Tier - The tier of this particular SKU.

const (
	TierStandard Tier = "Standard"
)

func PossibleTierValues

func PossibleTierValues() []Tier

PossibleTierValues returns the possible values for the Tier const type.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

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

	// READ-ONLY; Resource Etag.
	Etag *string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

TrackedResource - The resource model definition for an ARM tracked top level resource

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type Type

type Type string

Type - The type of this release (OS update).

const (
	TypeFeatureUpdate  Type = "FeatureUpdate"
	TypeSecurityUpdate Type = "SecurityUpdate"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

type UsageClient

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

UsageClient contains the methods for the Usage group. Don't use this type directly, use NewUsageClient() instead.

func NewUsageClient

func NewUsageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageClient, error)

NewUsageClient creates a new instance of UsageClient with the specified values.

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

func (*UsageClient) NewListPager added in v0.4.0

func (client *UsageClient) NewListPager(resourceGroupName string, testBaseAccountName string, options *UsageClientListOptions) *runtime.Pager[UsageClientListResponse]

NewListPager - Lists the usage data of a Test Base Account.

Generated from API version 2020-12-16-preview

  • resourceGroupName - The name of the resource group that contains the resource.
  • testBaseAccountName - The resource name of the Test Base Account.
  • options - UsageClientListOptions contains the optional parameters for the UsageClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/testbase/resource-manager/Microsoft.TestBase/preview/2020-12-16-preview/examples/TestBaseAccountUsagesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/testbase/armtestbase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armtestbase.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewUsageClient().NewListPager("contoso-rg1", "contoso-testBaseAccount1", &armtestbase.UsageClientListOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AccountUsageDataList = armtestbase.AccountUsageDataList{
		// 	Value: []*armtestbase.AccountUsageData{
		// 		{
		// 			Name: &armtestbase.AccountUsageName{
		// 				LocalizedValue: to.Ptr("contoso-package1-usage"),
		// 				Value: to.Ptr("contoso-package1-usage"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](7531),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/usages/contoso-package1-usage"),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr("Seconds"),
		// 		},
		// 		{
		// 			Name: &armtestbase.AccountUsageName{
		// 				LocalizedValue: to.Ptr("contoso-package2-usage"),
		// 				Value: to.Ptr("contoso-package2-usage"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](3157),
		// 			ID: to.Ptr("/subscriptions/476f61a4-952c-422a-b4db-568a828f35df/resourceGroups/contoso-rg1/providers/Microsoft.TestBase/testBaseAccounts/contoso-testBaseAccount1/usages/contoso-package2-usage"),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr("Seconds"),
		// 	}},
		// }
	}
}
Output:

type UsageClientListOptions added in v0.2.0

type UsageClientListOptions struct {
	// Odata filter
	Filter *string
}

UsageClientListOptions contains the optional parameters for the UsageClient.NewListPager method.

type UsageClientListResponse added in v0.2.0

type UsageClientListResponse struct {
	// A list of Test Base Account usage data.
	AccountUsageDataList
}

UsageClientListResponse contains the response from method UsageClient.NewListPager.

type UserObjectReceiverValue

type UserObjectReceiverValue struct {
	// user object ids.
	UserObjectIDs []*string
}

UserObjectReceiverValue - The user object receiver value.

func (UserObjectReceiverValue) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UserObjectReceiverValue.

func (*UserObjectReceiverValue) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserObjectReceiverValue.

type UtilizationBound

type UtilizationBound struct {
	// The percentile of the bound.
	Percentile *float64

	// The value of the bound.
	Value *float64
}

UtilizationBound - The bound of a utilization result.

func (UtilizationBound) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type UtilizationBound.

func (*UtilizationBound) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UtilizationBound.

type UtilizationEntry

type UtilizationEntry struct {
	// The timestamp.
	Timestamp *time.Time

	// The value.
	Value *float64
}

UtilizationEntry - The utilization entry.

func (UtilizationEntry) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UtilizationEntry.

func (*UtilizationEntry) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type UtilizationEntry.

type UtilizationResult

type UtilizationResult struct {
	// Lower bound
	LowerBound *UtilizationBound

	// Process name, or '_total' for all processes
	Process *string

	// Upper bound
	UpperBound *UtilizationBound

	// Utilization data
	Utilization []*UtilizationEntry
}

UtilizationResult - The Utilization Result.

func (UtilizationResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UtilizationResult.

func (*UtilizationResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UtilizationResult.

type ValidationRunStatus

type ValidationRunStatus string

ValidationRunStatus - The status of the validation run of the package.

const (
	ValidationRunStatusFailed  ValidationRunStatus = "Failed"
	ValidationRunStatusPassed  ValidationRunStatus = "Passed"
	ValidationRunStatusPending ValidationRunStatus = "Pending"
	ValidationRunStatusUnknown ValidationRunStatus = "Unknown"
)

func PossibleValidationRunStatusValues

func PossibleValidationRunStatusValues() []ValidationRunStatus

PossibleValidationRunStatusValues returns the possible values for the ValidationRunStatus const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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