Skip to main content

workloads

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

Overview

Nameworkloads
TypeResource
Idaws.application_insights.workloads

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
workload_configurationobjectThe configuration settings of the workload. The value is the escaped JSON of the configuration.
workload_idstringThe ID of the workload. (pattern: <code>w-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}</code>)
workload_remarksstringIf logging is supported for the resource type, shows whether the component has configured logs to be monitored.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_workloadselectregionDescribes a workload and its configuration.
list_workloadsselectregionLists the workloads that are configured on a given component.
add_workloadupdateregion, ResourceGroupName, ComponentName, WorkloadConfigurationAdds a workload to a component. Each component can have at most five workloads.
remove_workloadupdateregion, ResourceGroupName, ComponentName, WorkloadIdRemove workload from a component.
update_workloadexecregion, ResourceGroupName, ComponentName, WorkloadConfigurationAdds a workload to a component. Each component can have at most five workloads.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Describes a workload and its configuration.

SELECT
workload_configuration,
workload_id,
workload_remarks
FROM aws.application_insights.workloads
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Adds a workload to a component. Each component can have at most five workloads.

UPDATE aws.application_insights.workloads
SET
ResourceGroupName = '{{ ResourceGroupName }}',
ComponentName = '{{ ComponentName }}',
WorkloadConfiguration = '{{ WorkloadConfiguration }}'
WHERE
region = '{{ region }}' --required
AND ResourceGroupName = '{{ ResourceGroupName }}' --required
AND ComponentName = '{{ ComponentName }}' --required
AND WorkloadConfiguration = '{{ WorkloadConfiguration }}' --required
RETURNING
workload_configuration,
workload_id;

Lifecycle Methods

Adds a workload to a component. Each component can have at most five workloads.

EXEC aws.application_insights.workloads.update_workload
@region='{{ region }}' --required
@@json=
'{
"ResourceGroupName": "{{ ResourceGroupName }}",
"ComponentName": "{{ ComponentName }}",
"WorkloadId": "{{ WorkloadId }}",
"WorkloadConfiguration": "{{ WorkloadConfiguration }}"
}'
;