Skip to content

Commit

Permalink
Merge pull request #197 from stackql/feature/doc-updates
Browse files Browse the repository at this point in the history
resources doc fix
  • Loading branch information
jeffreyaven authored Oct 18, 2024
2 parents 7e7297a + 38f97d4 commit 8eb0d8e
Show file tree
Hide file tree
Showing 25 changed files with 1,178 additions and 491 deletions.
101 changes: 96 additions & 5 deletions docs/azure-docs/providers/azure/resources/changes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ hide_table_of_contents: false
keywords:
- changes
- resources
- google
- stackql
- azure
- microsoft azure
- infrastructure-as-code
- configuration-as-data
- cloud inventory
description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL
description: Query, deploy and manage Microsoft Azure infrastructure and resources using SQL
custom_edit_url: null
image: /img/providers/google/stackql-google-provider-featured-image.png
image: /img/providers/azure/stackql-azure-provider-featured-image.png
---

import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
Expand All @@ -29,9 +29,100 @@ Creates, updates, deletes, gets or lists a <code>changes</code> resource.
</tbody></table>

## Fields
`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource.
<Tabs
defaultValue="view"
values={[
{ label: 'vw_changes', value: 'view', },
{ label: 'changes', value: 'resource', },
]
}>
<TabItem value="view">

| Name | Datatype | Description |
|:-----|:---------|:------------|
| <CopyableCode code="id" /> | `text` | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| <CopyableCode code="name" /> | `text` | The name of the resource |
| <CopyableCode code="changeResourceId" /> | `text` | field from the `properties` object |
| <CopyableCode code="change_attributes" /> | `text` | field from the `properties` object |
| <CopyableCode code="change_type" /> | `text` | field from the `properties` object |
| <CopyableCode code="changes" /> | `text` | field from the `properties` object |
| <CopyableCode code="resourceGroupName" /> | `text` | field from the `properties` object |
| <CopyableCode code="resourceName" /> | `text` | field from the `properties` object |
| <CopyableCode code="resourceProviderNamespace" /> | `text` | field from the `properties` object |
| <CopyableCode code="resourceType" /> | `text` | field from the `properties` object |
| <CopyableCode code="subscriptionId" /> | `text` | field from the `properties` object |
| <CopyableCode code="target_resource_id" /> | `text` | field from the `properties` object |
| <CopyableCode code="target_resource_type" /> | `text` | field from the `properties` object |
| <CopyableCode code="type" /> | `text` | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
</TabItem>
<TabItem value="resource">

| Name | Datatype | Description |
|:-----|:---------|:------------|
| <CopyableCode code="id" /> | `string` | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| <CopyableCode code="name" /> | `string` | The name of the resource |
| <CopyableCode code="properties" /> | `object` | The properties of a change |
| <CopyableCode code="type" /> | `string` | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
</TabItem></Tabs>

## Methods
| Name | Accessible by | Required Params | Description |
|:-----|:--------------|:----------------|:------------|
| <CopyableCode code="get" /> | `SELECT` | <CopyableCode code="changeResourceId, resourceGroupName, resourceName, resourceProviderNamespace, resourceType, subscriptionId" /> | Obtains the specified change resource for the target resource |
| <CopyableCode code="list" /> | `SELECT` | <CopyableCode code="resourceGroupName, resourceName, resourceProviderNamespace, resourceType, subscriptionId" /> | Obtains a list of change resources from the past 14 days for the target resource |

## `SELECT` examples

Obtains a list of change resources from the past 14 days for the target resource

<Tabs
defaultValue="view"
values={[
{ label: 'vw_changes', value: 'view', },
{ label: 'changes', value: 'resource', },
]
}>
<TabItem value="view">

```sql
SELECT
id,
name,
changeResourceId,
change_attributes,
change_type,
changes,
resourceGroupName,
resourceName,
resourceProviderNamespace,
resourceType,
subscriptionId,
target_resource_id,
target_resource_type,
type
FROM azure.resources.vw_changes
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND resourceProviderNamespace = '{{ resourceProviderNamespace }}'
AND resourceType = '{{ resourceType }}'
AND subscriptionId = '{{ subscriptionId }}';
```
</TabItem>
<TabItem value="resource">


```sql
SELECT
id,
name,
properties,
type
FROM azure.resources.changes
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND resourceProviderNamespace = '{{ resourceProviderNamespace }}'
AND resourceType = '{{ resourceType }}'
AND subscriptionId = '{{ subscriptionId }}';
```
</TabItem></Tabs>

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ hide_table_of_contents: false
keywords:
- deployment_operations
- resources
- google
- stackql
- azure
- microsoft azure
- infrastructure-as-code
- configuration-as-data
- cloud inventory
description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL
description: Query, deploy and manage Microsoft Azure infrastructure and resources using SQL
custom_edit_url: null
image: /img/providers/google/stackql-google-provider-featured-image.png
image: /img/providers/azure/stackql-azure-provider-featured-image.png
---

import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
Expand All @@ -29,9 +29,102 @@ Creates, updates, deletes, gets or lists a <code>deployment_operations</code> re
</tbody></table>

## Fields
`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource.
<Tabs
defaultValue="view"
values={[
{ label: 'vw_deployment_operations', value: 'view', },
{ label: 'deployment_operations', value: 'resource', },
]
}>
<TabItem value="view">

| Name | Datatype | Description |
|:-----|:---------|:------------|
| <CopyableCode code="id" /> | `text` | Full deployment operation ID. |
| <CopyableCode code="deploymentName" /> | `text` | field from the `properties` object |
| <CopyableCode code="duration" /> | `text` | field from the `properties` object |
| <CopyableCode code="operationId" /> | `text` | Deployment operation ID. |
| <CopyableCode code="operation_id" /> | `text` | field from the `properties` object |
| <CopyableCode code="provisioning_operation" /> | `text` | field from the `properties` object |
| <CopyableCode code="provisioning_state" /> | `text` | field from the `properties` object |
| <CopyableCode code="request" /> | `text` | field from the `properties` object |
| <CopyableCode code="resourceGroupName" /> | `text` | field from the `properties` object |
| <CopyableCode code="response" /> | `text` | field from the `properties` object |
| <CopyableCode code="service_request_id" /> | `text` | field from the `properties` object |
| <CopyableCode code="status_code" /> | `text` | field from the `properties` object |
| <CopyableCode code="status_message" /> | `text` | field from the `properties` object |
| <CopyableCode code="subscriptionId" /> | `text` | field from the `properties` object |
| <CopyableCode code="target_resource" /> | `text` | field from the `properties` object |
| <CopyableCode code="timestamp" /> | `text` | field from the `properties` object |
</TabItem>
<TabItem value="resource">

| Name | Datatype | Description |
|:-----|:---------|:------------|
| <CopyableCode code="id" /> | `string` | Full deployment operation ID. |
| <CopyableCode code="operationId" /> | `string` | Deployment operation ID. |
| <CopyableCode code="properties" /> | `object` | Deployment operation properties. |
</TabItem></Tabs>

## Methods
| Name | Accessible by | Required Params | Description |
|:-----|:--------------|:----------------|:------------|
| <CopyableCode code="get" /> | `SELECT` | <CopyableCode code="deploymentName, operationId, resourceGroupName, subscriptionId" /> | Gets a deployments operation. |
| <CopyableCode code="get_at_management_group_scope" /> | `SELECT` | <CopyableCode code="deploymentName, groupId, operationId" /> | Gets a deployments operation. |
| <CopyableCode code="get_at_scope" /> | `SELECT` | <CopyableCode code="deploymentName, operationId, scope" /> | Gets a deployments operation. |
| <CopyableCode code="get_at_subscription_scope" /> | `SELECT` | <CopyableCode code="deploymentName, operationId, subscriptionId" /> | Gets a deployments operation. |
| <CopyableCode code="get_at_tenant_scope" /> | `SELECT` | <CopyableCode code="deploymentName, operationId" /> | Gets a deployments operation. |
| <CopyableCode code="list" /> | `SELECT` | <CopyableCode code="deploymentName, resourceGroupName, subscriptionId" /> | Gets all deployments operations for a deployment. |
| <CopyableCode code="list_at_management_group_scope" /> | `SELECT` | <CopyableCode code="deploymentName, groupId" /> | Gets all deployments operations for a deployment. |
| <CopyableCode code="list_at_scope" /> | `SELECT` | <CopyableCode code="deploymentName, scope" /> | Gets all deployments operations for a deployment. |
| <CopyableCode code="list_at_subscription_scope" /> | `SELECT` | <CopyableCode code="deploymentName, subscriptionId" /> | Gets all deployments operations for a deployment. |
| <CopyableCode code="list_at_tenant_scope" /> | `SELECT` | <CopyableCode code="deploymentName" /> | Gets all deployments operations for a deployment. |

## `SELECT` examples

Gets all deployments operations for a deployment.

<Tabs
defaultValue="view"
values={[
{ label: 'vw_deployment_operations', value: 'view', },
{ label: 'deployment_operations', value: 'resource', },
]
}>
<TabItem value="view">

```sql
SELECT
id,
deploymentName,
duration,
operationId,
operation_id,
provisioning_operation,
provisioning_state,
request,
resourceGroupName,
response,
service_request_id,
status_code,
status_message,
subscriptionId,
target_resource,
timestamp
FROM azure.resources.vw_deployment_operations
WHERE deploymentName = '{{ deploymentName }}';
```
</TabItem>
<TabItem value="resource">


```sql
SELECT
id,
operationId,
properties
FROM azure.resources.deployment_operations
WHERE deploymentName = '{{ deploymentName }}';
```
</TabItem></Tabs>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8eb0d8e

Please sign in to comment.