packages
Creates, updates, deletes, gets or lists a packages resource.
Overview
| Name | packages |
| Type | Resource |
| Id | azure_extras.testbase.packages |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_test_base_account
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
applicationName | string | Application name. |
blobPath | string | The file path of the package. |
etag | string | Resource Etag. |
flightingRing | string | The flighting ring for feature update. |
isEnabled | boolean | Flag showing that whether the package is enabled. It doesn't schedule test for package which is not enabled. |
lastModifiedTime | string (date-time) | The UTC timestamp when the package was last modified. |
location | string | The geo-location where the resource lives. Required. |
packageStatus | string | The status of the package. Known values are: "Unknown", "Registered", "Ready", "Error", "ValidatingPackage", "PreValidationCheckPass", "Deleted", "ValidationLongerThanUsual", and "VerifyingPackage". |
provisioningState | string | The provisioning state of the resource. Known values are: "Succeeded", "Failed", "Cancelled", "Creating", "Deleting", and "Updating". |
systemData | object | The system metadata relating to this resource. |
tags | object | The tags of the resource. |
targetOSList | array | Specifies the target OSs of specific OS Update types. |
testTypes | array | OOB, functional or both. Mapped to the data in 'tests' property. |
tests | array | The detailed test information. |
type | string | Resource type. |
validationResults | array | The validation results. There's validation on package when it's created or updated. |
version | string | Application version. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
applicationName | string | Application name. |
blobPath | string | The file path of the package. |
etag | string | Resource Etag. |
flightingRing | string | The flighting ring for feature update. |
isEnabled | boolean | Flag showing that whether the package is enabled. It doesn't schedule test for package which is not enabled. |
lastModifiedTime | string (date-time) | The UTC timestamp when the package was last modified. |
location | string | The geo-location where the resource lives. Required. |
packageStatus | string | The status of the package. Known values are: "Unknown", "Registered", "Ready", "Error", "ValidatingPackage", "PreValidationCheckPass", "Deleted", "ValidationLongerThanUsual", and "VerifyingPackage". |
provisioningState | string | The provisioning state of the resource. Known values are: "Succeeded", "Failed", "Cancelled", "Creating", "Deleting", and "Updating". |
systemData | object | The system metadata relating to this resource. |
tags | object | The tags of the resource. |
targetOSList | array | Specifies the target OSs of specific OS Update types. |
testTypes | array | OOB, functional or both. Mapped to the data in 'tests' property. |
tests | array | The detailed test information. |
type | string | Resource type. |
validationResults | array | The validation results. There's validation on package when it's created or updated. |
version | string | Application version. |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
package_name | string | The resource name of the Test Base Package. Required. |
resource_group_name | string | The name of the resource group that contains the resource. Required. |
subscription_id | string | |
test_base_account_name | string | The resource name of the Test Base Account. Required. |
SELECT examples
- get
- list_by_test_base_account
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
;
Lists all the packages under a Test Base Account.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: packages
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the packages resource.
- name: test_base_account_name
value: "{{ test_base_account_name }}"
description: Required parameter for the packages resource.
- name: package_name
value: "{{ package_name }}"
description: Required parameter for the packages resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the packages resource.
- name: tags
value: "{{ tags }}"
description: |
The tags of the resource.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
value:
applicationName: "{{ applicationName }}"
version: "{{ version }}"
targetOSList:
- osUpdateType: "{{ osUpdateType }}"
targetOSs: "{{ targetOSs }}"
baselineOSs: "{{ baselineOSs }}"
flightingRing: "{{ flightingRing }}"
blobPath: "{{ blobPath }}"
tests:
- testType: "{{ testType }}"
validationRunStatus: "{{ validationRunStatus }}"
validationResultId: "{{ validationResultId }}"
isActive: {{ isActive }}
commands: "{{ commands }}"
UPDATE examples
- update
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
- delete
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
- get_download_url
- hard_delete
- run_test
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
;
Hard Delete a Test Base Package.
EXEC azure_extras.testbase.packages.hard_delete
@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
;
Trigger a test run on the package.
EXEC azure_extras.testbase.packages.run_test
@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
@@json=
'{
"testType": "{{ testType }}",
"osUpdateType": "{{ osUpdateType }}",
"osName": "{{ osName }}",
"releaseName": "{{ releaseName }}",
"flightingRing": "{{ flightingRing }}"
}'
;