azure_data_factory_pipeline_run_resources Resource
Use the azure_data_factory_pipeline_run_resources
InSpec audit resource to test the properties multiple Azure Data Factory pipeline runs for a resource group or the entire subscription.
For additional information, see the Azure Data Factory pipeline runs API documentation.
Azure REST API Version, Endpoint, and HTTP Client Parameters
This resource interacts with API versions supported by the resource provider.
The api_version
can be defined as a resource parameter.
If not provided, this resource uses the latest version.
For more information, refer to the azure_generic_resource document.
Unless defined, this resource uses the azure_cloud
global endpoint and default values for the HTTP client.
For more information, refer to the resource pack README.
Installation
This resource is available in the Chef InSpec Azure resource pack.
See the Chef InSpec documentation on cloud platforms for information on configuring your Azure environment for InSpec and creating an InSpec profile that uses the InSpec Azure resource pack.
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 that the targeted resource resides in.
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
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.
Was this page helpful?