Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Munge docs content so we can deploy it on docs.chef.io #640

Merged
merged 2 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
+++
title = "azure_power_bi_app_dashboard_tile Resource"
platform = "azure"
draft = false
gh_repo = "inspec-azure"

[menu.inspec]
title = "azure_power_bi_app_dashboard_tile"
identifier = "inspec/resources/azure/azure_power_bi_app_dashboard_tile Resource"
parent = "inspec/resources/azure"
+++

Use the `azure_power_bi_app_dashboard_tile` InSpec audit resource to test the properties related to Azure Power BI App dashboard tile.

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

{{% inspec_azure_common_parameters %}}

## Installation

{{% inspec_azure_install %}}

## Syntax

`app_id`, `dashboard_id` and `tile_id` is a required parameter.

```ruby
describe azure_power_bi_app_dashboard_tile(app_id: 'APP_ID', dashboard_id: 'DASHBOARD_ID', tile_id: 'TILE_ID') do
it { should exist }
end
```

## Parameters

`app_id` _(required)_

: The app ID.

`dashboard_id` _(required)_

: The App Dashboard ID.

`tile_id` _(required)_

: The App dashboard tile ID.

## Properties

`id`
: The tile ID.

`title`
: The dashboard display name.

`embedUrl`
: The tile embed url.

`rowSpan`
: number of rows a tile should span.

`colSpan`
: number of columns a tile should span.

`reportId`
: The report ID, which is available only for tiles created from a report.

`datasetId`
: The dataset ID, which is available only for tiles created from a report or using a dataset, such as Q&A tiles.

For properties applicable to all resources, such as `type`, `name`, `id`, and `properties`, refer to [`azure_generic_resource`]({{< relref "azure_generic_resource.md#properties" >}}).

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

## Examples

**Test that the Power BI App dashboard tile is at the left corner.**

```ruby
describe azure_power_bi_app_dashboard_tile(app_id: 'APP_ID', dashboard_id: 'DASHBOARD_ID', tile_id: 'TILE_ID') do
its('rowSpan') { should eq 0 }
its('colSpan') { should eq 0 }
end
```

## Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](/inspec/matchers/).

### exists

```ruby
# If the Azure Power BI App dashboard tile is found, it will exist
describe azure_power_bi_app_dashboard_tile(app_id: 'APP_ID', dashboard_id: 'DASHBOARD_ID', tile_id: 'TILE_ID') do
it { should exist }
end
# if the Azure Power BI App dashboard tile is not found, it will not exist
describe azure_power_bi_app_dashboard_tile(app_id: 'APP_ID', dashboard_id: 'DASHBOARD_ID', tile_id: 'TILE_ID') do
it { should_not exist }
end
```

## Azure Permissions

This API does not support service principal authentication. Instead, use an Active Directory account access token to access this resource.
Your Active Directory account must be set up with a `Dashboard.Read.All` role on the Azure Power BI workspace that you wish to test.
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
+++
title = "azure_power_bi_app_dashboard_tiles Resource"
platform = "azure"
draft = false
gh_repo = "inspec-azure"

[menu.inspec]
title = "azure_power_bi_app_dashboard_tiles"
identifier = "inspec/resources/azure/azure_power_bi_app_dashboard_tiles Resource"
parent = "inspec/resources/azure"
+++

Use the `azure_power_bi_app_dashboard_tiles` InSpec audit resource to test the properties related to all Azure Power BI App dashboard tiles.

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

{{% inspec_azure_common_parameters %}}

## Installation

{{% inspec_azure_install %}}

## Syntax

An `azure_power_bi_app_dashboard_tiles` resource block returns all Azure Power BI App dashboard tiles.

```ruby
describe azure_power_bi_app_dashboard_tiles(app_id: 'APP_ID', dashboard_id: 'DASHBOARD_ID') do
#...
end
```

## Parameters

`app_id` _(required)_

: The app ID.

`dashboard_id` _(required)_

: The App Dashboard ID.

## Properties

`ids`
: List of all App dashboard tile IDs.

: **Field**: `id`

`titles`
: List of all the dashboard title.

: **Field**: `title`

`embedUrls`
: List of all the dashboard embed urls.

: **Field**: `embedUrl`

`rowSpans`
: List of all the row span values.

: **Field**: `rowSpan`

`colSpans`
: List of all the col span values.

: **Field**: `colSpan`

`reportIds`
: List of all the report IDs.

: **Field**: `reportId`

`datasetIds`
: List of all the dataset IDs.

: **Field**: `datasetId`

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

## Examples

**Loop through Power BI App dashboard tiles by their IDs.**

```ruby
azure_power_bi_app_dashboard_tiles(app_id: 'APP_ID', dashboard_id: 'DASHBOARD_ID').ids.each do |id|
describe azure_power_bi_app_dashboard_tile(app_id: 'APP_ID', dashboard_id: 'DASHBOARD_ID', tile_id: id) do
it { should exist }
end
end
```

**Test to filter out Power BI App dashboard tiles that are in left corner.**

```ruby
describe azure_power_bi_app_dashboard_tiles(app_id: 'APP_ID', dashboard_id: 'DASHBOARD_ID').where(rowSpan: 0, colSpan: 0) do
it { should exist }
end
```

## Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/).

### exists

Use `should` to test that an entity exists.

```ruby
describe azure_power_bi_app_dashboard_tiles(app_id: 'APP_ID') do
it { should_not exist }
end
```

Use `should_not` to test that the entity does not exist.

```ruby
describe azure_power_bi_app_dashboard_tiles(app_id: 'APP_ID') do
it { should exist }
end
```

## Azure Permissions

This API does not support service principal authentication. Instead, use an Active Directory account access token to access this resource.
Your Active Directory account must be set up with a `Dashboard.Read.All` role on the Azure Power BI workspace that you wish to test.
112 changes: 112 additions & 0 deletions docs-chef-io/content/inspec/resources/azure_power_bi_capacities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
+++
title = "azure_power_bi_app_capacities Resource"
platform = "azure"
draft = false
gh_repo = "inspec-azure"

[menu.inspec]
title = "azure_power_bi_app_capacities"
identifier = "inspec/resources/azure/azure_power_bi_app_capacities Resource"
parent = "inspec/resources/azure"
+++

Use the `azure_power_bi_app_capacities` InSpec audit resource to test the properties related to all Azure Power BI capacities.

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

{{% inspec_azure_common_parameters %}}

## Installation

{{% inspec_azure_install %}}

## Syntax

An `azure_power_bi_app_capacities` resource block returns all Azure Power BI capacities.

```ruby
describe azure_power_bi_app_capacities do
#...
end
```

## Parameters

This resource does not require any parameters.

## Properties

`ids`
: List of all Power BI capacity IDs.

: **Field**: `id`

`displayNames`
: List of all the Power BI capacity names.

: **Field**: `displayName`

`admins`
: An array of capacity admins.

: **Field**: `admin`

`skus`
: List of all capacity SKUs.

: **Field**: `sku`

`states`
: List of the capacity states.

: **Field**: `state`

`regions`
: List of the Azure regions where the capacity is provisioned.

: **Field**: `region`

`capacityUserAccessRights`
: List of access rights user has on the capacity.

: **Field**: `capacityUserAccessRight`

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

## Examples

**Test to ensure Power BI capacities are active.**

```ruby
describe azure_power_bi_app_capacities.where(state: 'Active') do
it { should exist }
end
```

## Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/).

### exists

Use `should` to test that the entity exists.

```ruby
describe azure_power_bi_app_capacities do
it { should exist }
end
```

Use `should_not` to test that the entity does not exist.

```ruby
describe azure_power_bi_app_capacities do
it { should_not exist }
end
```

## Azure Permissions

This API does not support service principal authentication. Instead, use an Active Directory account access token to access this resource.
Your Active Directory account must be set up with a `Capacity.Read.All` role on the Azure Power BI workspace that you wish to test.
Loading