Skip to main content

azure_power_bi_capacity_refreshable resource

Use the azure_power_bi_capacity_refreshable InSpec audit resource to test the properties of an Azure Power BI Capacity refreshable.

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_power_bi_capacity_refreshable(capacity_id: 'CAPACITY_ID', name: 'REFRESHABLE_ID') do
  it { should exist }
end
describe azure_power_bi_capacity_refreshable(capacity_id: 'CAPACITY_ID', name: 'REFRESHABLE_ID')  do
  it { should exist }
end

Parameters

name (required)

The refreshable ID.

capacity_id (required)

The capacity ID.

Properties

id
The object ID of the refreshable.
kind
The refreshable kind.
name
Display refreshable name.
startTime
The start time of the window for which summary data exists.
endTime
The end time of the window for which summary data exists.
refreshCount
The number of refreshes within the summary time window.
refreshFailures
The number of refresh failures within the summary time window.
refreshesPerDay
The number of refreshes (schedule+onDemand) per day within the summary time window with at most 60.
refreshSchedule.days
Days to execute the refresh.
refreshSchedule.enabled
Is the refresh enabled.

For properties applicable to all resources, such as type, name, id, and properties, refer to azure_generic_resource.

Also, see the Azure documentation for other available properties.

Examples

Test that the Power BI Capacity refreshable schedule is enabled:

describe azure_power_bi_capacity_refreshable(capacity_id: 'CAPACITY_ID', name: 'REFRESHABLE_ID')  do
  its('refreshSchedules.enabled') { should be_truthy }
end

Matchers

For a full list of available matchers, see our Universal Matchers page.

exists

# If the Power BI Capacity refreshable is found, it will exist.

describe azure_power_bi_capacity_refreshable(capacity_id: 'CAPACITY_ID', name: 'REFRESHABLE_ID')  do
  it { should exist }
end

not_exists

# if the Power BI Capacity refreshable is not found, it will not exist.
describe azure_power_bi_capacity_refreshable(capacity_id: 'CAPACITY_ID', name: 'REFRESHABLE_ID')  do
  it { should_not exist }
end

Azure permissions

Your service principal must have the Capacity.Read.All role on the Azure Power BI Capacity you wish to test.

Thank you for your feedback!

×