Skip to content

Commit

Permalink
Docs edits
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
  • Loading branch information
IanMadd authored and clintoncwolfe committed Feb 18, 2022
1 parent 6e4a673 commit 78d9c6f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 33 deletions.
29 changes: 12 additions & 17 deletions docs/resources/azure_power_bi_dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ platform: azure

# azure_power_bi_dataset

Use the `azure_power_bi_dataset` InSpec audit resource to test the properties related to Azure Power BI Dataset.
Use the `azure_power_bi_dataset` InSpec audit resource to test the properties related to Azure Power BI dataset.

## Azure REST API version, Endpoint, and HTTP Client Parameters

Expand All @@ -22,9 +22,6 @@ This resource is available in the [InSpec Azure resource pack](https://github.co

## Syntax

- `name` is a required parameter.
- `group_id` is an optional parameter.

```ruby
describe azure_power_bi_dataset(name: 'DATASET_ID') do
it { should exist }
Expand All @@ -39,27 +36,25 @@ end

## Parameters

| Name | Description |
|----------------|----------------------------------------------------------------------------------|
| name | The Dataset ID. |
| group_id | The workspace ID.(optional) |
`name` _(required)_

The dataset ID.

The parameter set should be provided for a valid query:
`group_id` _(optional)_

- `name`
- `name` and `group_id`
The workspace ID.

## Properties

| Property | Description |
|----------------------------|------------------------------------------------------------------|
| name | The dataset name. |
| addRowsAPIEnabled | Whether the dataset allows adding new rows. |
| configuredBy | The dataset owner. |
| configuredBy | The dataset owner. |
| isRefreshable | Can this dataset be refreshed. |
| isEffectiveIdentityRequired| Whether the dataset requires an effective identity. This indicates that you must send an effective identity using the GenerateToken API.|
| isEffectiveIdentityRolesRequired | Whether RLS is defined inside the PBIX file. This indicates that you must specify a role.|
| isOnPremGatewayRequired | Dataset requires an On-premises Data Gateway. |
| isOnPremGatewayRequired | dataset requires an On-premises Data Gateway. |


For properties applicable to all resources, such as `type`, `name`, `id`, and `properties`, refer to [`azure_generic_resource`](azure_generic_resource.md#properties).
Expand All @@ -68,7 +63,7 @@ Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/p

## Examples

### Test that the Power BI Dataset requires an on-prem Gateway
### Test that the Power BI dataset requires an on-prem gateway

```ruby
describe azure_power_bi_dataset(name: 'DATASET_ID') do
Expand All @@ -84,16 +79,16 @@ This InSpec audit resource has the following special matchers. For a full list o
### exists

```ruby
# If the Power BI Dataset is found, it will exist
# If the Power BI dataset is found, it will exist
describe azure_power_bi_dataset(name: 'DATASET_ID') do
it { should exist }
end
# if the Power BI Dataset is not found, it will not exist
# if the Power BI dataset is not found, it will not exist
describe azure_power_bi_dataset(name: 'DATASET_ID') do
it { should_not exist }
end
```

## Azure Permissions

Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with a `Dataset.Read.All` role on the Azure Power BI Dataset you wish to test.
Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with a `Dataset.Read.All` role on the Azure Power BI dataset you wish to test.
29 changes: 13 additions & 16 deletions docs/resources/azure_power_bi_datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ platform: azure

# azure_power_bi_datasets

Use the `azure_power_bi_datasets` InSpec audit resource to test the properties related to all Azure Power BI Datasets.
Use the `azure_power_bi_datasets` InSpec audit resource to test the properties of all Azure Power BI datasets.

## Azure REST API version, Endpoint, and HTTP Client Parameters

Expand All @@ -22,9 +22,7 @@ This resource is available in the [InSpec Azure resource pack](https://github.co

## Syntax

`group_id` is an optional parameter.

An `azure_power_bi_datasets` resource block returns all Azure Power BI Datasets.
An `azure_power_bi_datasets` resource block returns all Azure Power BI datasets.

```ruby
describe azure_power_bi_datasets do
Expand All @@ -34,31 +32,29 @@ end

## Parameters

| Name | Description |
|----------------|----------------------------------------------------------------------------------|
| group_id | The workspace ID.(optional) |
`group_id` _(optional)_

The workspace ID.

## Properties

|Property | Description | Filter Criteria<superscript>*</superscript> |
|---------------------------|------------------------------------------------------------------------|------------------|
| ids | List of all Power BI Dataset IDs. | `id` |
| names | List of all the Power BI Dataset names. | `name` |
| ids | List of all Power BI dataset IDs. | `id` |
| names | List of all the Power BI dataset names. | `name` |
| addRowsAPIEnableds | List of boolean flags which describes whether the dataset allows adding new rows.| `addRowsAPIEnabled`|
| isRefreshables | List of boolean flags that represent refreshable parameter of Datasets. | `isRefreshable` |
| isRefreshables | List of boolean flags that represent refreshable parameter of datasets. | `isRefreshable` |
| isEffectiveIdentityRequireds | List of boolean flags that represent effective identity. | `isEffectiveIdentityRequired` |
| isEffectiveIdentityRolesRequireds | List of boolean flags that describes whether RLS is defined inside the PBIX file. | `isEffectiveIdentityRolesRequired` |
| isOnPremGatewayRequireds | List of boolean flags that describes whether dataset requires an On-premises Data Gateway.| `isOnPremGatewayRequired` |



<superscript>*</superscript> For information on how to use filter criteria on plural resources refer to [FilterTable usage](https://github.com/inspec/inspec/blob/master/dev-docs/filtertable-usage.md).

Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasets) for other properties available.

## Examples

### Test to ensure Power BI Dataset is refreshable
### Test to ensure Power BI dataset is refreshable

```ruby
describe azure_power_bi_datasets.where(isRefreshable: true) do
Expand All @@ -73,15 +69,16 @@ This InSpec audit resource has the following special matchers. For a full list o
### exists

```ruby
# Should not exist if no Power BI Datasets are present
# Should not exist if no Power BI datasets are present
describe azure_power_bi_datasets do
it { should_not exist }
end
# Should exist if the filter returns at least one Power BI Datasets
# Should exist if the filter returns at least one Power BI datasets
describe azure_power_bi_datasets do
it { should exist }
end
```

## Azure Permissions
Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with a `Dataset.Read.All` role on the Azure Power BI Dataset you wish to test.

Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with a `Dataset.Read.All` role on the Azure Power BI dataset you wish to test.

0 comments on commit 78d9c6f

Please sign in to comment.