Skip to main content

azure_data_factory_dataset resource

Use the azure_data_factory_dataset InSpec audit resource to test the properties related to an Azure Data Factory dataset.

See the Azure Data Factories Dataset documentation for additional information.

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

describe azure_data_factory_dataset(resource_group: 'RESOURCE_GROUP', factory_name: 'FACTORY_NAME', dataset_name: 'DATASET_NAME') do
  it { should exist }
end

Parameters

resource_group (required)
Azure resource group where the targeted resource resides.
dataset_name (required)
Name of the Azure resource to test.
factory_name (required)
The factory name.

Properties

name
Name of the Azure resource to test.
id
The azure_sentinel_alert_rule type.
properties
The properties of the resource.
type
Azure resource type.
description
The description of dataset type.
properties.linkedServiceName.referenceName
Reference LinkedService name.
properties.linkedServiceName.type
Linked service reference type.
properties.type
The dataset type.AmazonMWSObjectDataset, AvroDataset.

Examples

Test if properties match:

describe azure_data_factory_dataset(resource_group: 'RESOURCE_GROUP', factory_name: 'FACTORY_NAME', dataset_name: 'DATASET_NAME') do
  it { should exist }
  its('name') { should eq 'DATASET_NAME'}
  its('type') { should eq 'Microsoft.DataFactory/factories/datasets' }
  its('properties.description') { should eq 'Description of dataset.' }
  its('properties.linkedServiceName.referenceName') { should eq 'LINKED_SERVICE_NAME' }
  its('properties.linkedServiceName.type') { should eq 'LinkedServiceReference' }
end

Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.

exists

# If a dataset should exist.

describe azure_data_factory_dataset(resource_group: 'RESOURCE_GROUP', factory_name: 'FACTORY_NAME', dataset_name: 'DATASET_NAME') do
  it { should exist }
end

not_exists


# If a dataset should not exist.

describe azure_data_factory_dataset(resource_group: 'RESOURCE_GROUP', factory_name: 'FACTORY_NAME', dataset_name: 'DATASET_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.

Thank you for your feedback!

×