Skip to main content

packages

Creates, updates, deletes, gets or lists a packages resource.

Overview

Namepackages
TypeResource
Idazure_extras.testbase.packages

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
applicationNamestringApplication name.
blobPathstringThe file path of the package.
etagstringResource Etag.
flightingRingstringThe flighting ring for feature update.
isEnabledbooleanFlag showing that whether the package is enabled. It doesn't schedule test for package which is not enabled.
lastModifiedTimestring (date-time)The UTC timestamp when the package was last modified.
locationstringThe geo-location where the resource lives. Required.
packageStatusstringThe status of the package. Known values are: "Unknown", "Registered", "Ready", "Error", "ValidatingPackage", "PreValidationCheckPass", "Deleted", "ValidationLongerThanUsual", and "VerifyingPackage".
provisioningStatestringThe provisioning state of the resource. Known values are: "Succeeded", "Failed", "Cancelled", "Creating", "Deleting", and "Updating".
systemDataobjectThe system metadata relating to this resource.
tagsobjectThe tags of the resource.
targetOSListarraySpecifies the target OSs of specific OS Update types.
testTypesarrayOOB, functional or both. Mapped to the data in 'tests' property.
testsarrayThe detailed test information.
typestringResource type.
validationResultsarrayThe validation results. There's validation on package when it's created or updated.
versionstringApplication version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, test_base_account_name, package_name, subscription_idGets a Test Base Package.
list_by_test_base_accountselectresource_group_name, test_base_account_name, subscription_idLists all the packages under a Test Base Account.
createinsertresource_group_name, test_base_account_name, package_name, subscription_id, locationCreate or replace (overwrite/recreate, with potential downtime) a Test Base Package.
updateupdateresource_group_name, test_base_account_name, package_name, subscription_idUpdate an existing Test Base Package.
deletedeleteresource_group_name, test_base_account_name, package_name, subscription_idDeletes a Test Base Package.
get_download_urlexecresource_group_name, test_base_account_name, package_name, subscription_idGets the download URL of a package.
hard_deleteexecresource_group_name, test_base_account_name, package_name, subscription_idHard Delete a Test Base Package.
run_testexecresource_group_name, test_base_account_name, package_name, subscription_id, testType, osNameTrigger a test run on the package.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
package_namestringThe resource name of the Test Base Package. Required.
resource_group_namestringThe name of the resource group that contains the resource. Required.
subscription_idstring
test_base_account_namestringThe resource name of the Test Base Account. Required.

SELECT examples

Gets a Test Base Package.

SELECT
id,
name,
applicationName,
blobPath,
etag,
flightingRing,
isEnabled,
lastModifiedTime,
location,
packageStatus,
provisioningState,
systemData,
tags,
targetOSList,
testTypes,
tests,
type,
validationResults,
version
FROM azure_extras.testbase.packages
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND test_base_account_name = '{{ test_base_account_name }}' -- required
AND package_name = '{{ package_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or replace (overwrite/recreate, with potential downtime) a Test Base Package.

INSERT INTO azure_extras.testbase.packages (
tags,
location,
properties,
resource_group_name,
test_base_account_name,
package_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ test_base_account_name }}',
'{{ package_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update an existing Test Base Package.

UPDATE azure_extras.testbase.packages
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND test_base_account_name = '{{ test_base_account_name }}' --required
AND package_name = '{{ package_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a Test Base Package.

DELETE FROM azure_extras.testbase.packages
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND test_base_account_name = '{{ test_base_account_name }}' --required
AND package_name = '{{ package_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets the download URL of a package.

EXEC azure_extras.testbase.packages.get_download_url 
@resource_group_name='{{ resource_group_name }}' --required,
@test_base_account_name='{{ test_base_account_name }}' --required,
@package_name='{{ package_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;