azure_data_factory_pipeline_run_resources resource
Use the azure_data_factory_pipeline_run_resources
InSpec audit resource to test the properties of multiple Azure Data Factory pipeline runs for a resource group or the entire subscription.
For additional information, see the API documentation on Azure Data Factory pipeline runs
.
Azure REST API version, endpoint, and HTTP client parameters
This resource interacts with API versions supported by the resource provider.
You can specify the api_version
as a resource parameter to use a specific version of the Azure REST API.
If you don’t specify an API version, this resource uses the latest version available.
For more information about API versioning, see the azure_generic_resource
.
By default, this resource uses the azure_cloud
global endpoint and default HTTP client settings.
You can override these settings if you need to connect to a different Azure environment (such as Azure Government or Azure China).
For more information about configuration options, see the resource pack README.
Syntax
An azure_data_factory_pipeline_run_resources
resource block returns all Azure Data Factory pipeline runs.
describe azure_data_factory_pipeline_run_resources(resource_group: `RESOURCE_GROUP`, factory_name: 'FACTORY_NAME') do
#...
end
Parameters
resource_group
(required)Azure resource group where the targeted resource resides.
factory_name
(required)Azure factory name for which pipeline runs are retrieved.
Properties
invokedBy_names
- A list of the unique resource names.
Field:
invokedBy_name
pipelineNames
- A list of the pipeline names.
Field:
pipelineName
statuses
- The statuses of the pipeline runs.
Field:
status
runIds
- The list of identifiers of runs.
Field:
runId
runStart
- The list of start times of pipeline runs in ISO8601 format.
Field:
runStart
runEnd
- The list of end times of pipeline runs in ISO8601 format.
Field:
runEnd
Note
Examples
Filter pipeline runs in a resource group by properties:
describe azure_data_factory_pipeline_run_resources(resource_group: `RESOURCE_GROUP`, factory_name: 'FACTORY_NAME') do
its('invokedBy_names') { should include 'INVOKED_BY_NAME' }
its('pipelineNames') { should include 'PIPELINE_NAME' }
its('statuses') { should include 'PIPELINE_STATUS' }
end
Matchers
Test if any pipeline runs exist in the resource group:
describe azure_data_factory_pipeline_run_resources(resource_group: `RESOURCE_GROUP`, factory_name: 'FACTORY_NAME') do
it { should exist }
end
Test that there aren’t any pipeline runs in a resource group:
# Should not exist if no pipeline runs are in the resource group.
describe azure_data_factory_pipeline_run_resources(resource_group: `RESOURCE_GROUP`, factory_name: 'FACTORY_NAME') do
it { should_not exist }
end
Azure permissions
Your Service Principal must be set up with at least a contributor
role on the subscription you wish to test.