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. 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.

Install

This resource is available in the Chef InSpec Azure resource pack.

For information on configuring your Azure environment for Chef InSpec and creating an InSpec profile that uses the InSpec Azure resource pack, see the Chef InSpec documentation for the Azure cloud platform.

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.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results