From 38f97d408a3c67518b4831a4431df4ef40931ca0 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Fri, 18 Oct 2024 17:09:30 +1100 Subject: [PATCH] resources doc fix --- .../azure/resources/changes/index.md | 101 ++++++- .../resources/deployment_operations/index.md | 103 ++++++- .../index.md | 37 --- .../deployment_operations_at_scope/index.md | 37 --- .../index.md | 37 --- .../index.md | 37 --- .../azure/resources/deployments/index.md | 256 +++++++++++++++++- .../index.md | 37 --- .../resources/deployments_at_scope/index.md | 37 --- .../index.md | 37 --- .../deployments_at_tenant_scope/index.md | 37 --- .../providers/azure/resources/index.md | 22 +- .../azure/resources/operations/index.md | 35 ++- .../provider_resource_types/index.md | 45 ++- .../azure/resources/providers/index.md | 43 ++- .../providers_at_tenant_scope/index.md | 37 --- .../azure/resources/resource_groups/index.md | 182 ++++++++++++- .../azure/resources/resources/index.md | 178 +++++++++++- .../azure/resources/subscriptions/index.md | 44 ++- .../subscriptions_locations/index.md | 38 ++- .../providers/azure/resources/tags/index.md | 83 +++++- .../azure/resources/tags_at_scope/index.md | 37 --- .../azure/resources/tags_value/index.md | 37 --- .../azure/resources/tags_values/index.md | 88 ++++++ .../azure/resources/tenants/index.md | 44 ++- 25 files changed, 1178 insertions(+), 491 deletions(-) delete mode 100644 docs/azure-docs/providers/azure/resources/deployment_operations_at_management_group_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/deployment_operations_at_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/deployment_operations_at_subscription_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/deployment_operations_at_tenant_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/deployments_at_management_group_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/deployments_at_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/deployments_at_subscription_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/deployments_at_tenant_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/providers_at_tenant_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/tags_at_scope/index.md delete mode 100644 docs/azure-docs/providers/azure/resources/tags_value/index.md create mode 100644 docs/azure-docs/providers/azure/resources/tags_values/index.md diff --git a/docs/azure-docs/providers/azure/resources/changes/index.md b/docs/azure-docs/providers/azure/resources/changes/index.md index 16af1f4ba7..e8e0196cff 100644 --- a/docs/azure-docs/providers/azure/resources/changes/index.md +++ b/docs/azure-docs/providers/azure/resources/changes/index.md @@ -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'; @@ -29,9 +29,100 @@ Creates, updates, deletes, gets or lists a changes resource. ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. + + +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `text` | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | +| | `text` | The name of the resource | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | + + + +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | +| | `string` | The name of the resource | +| | `object` | The properties of a change | +| | `string` | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | + ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Obtains the specified change resource for the target resource | +| | `SELECT` | | 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 + + + + +```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 }}'; +``` + + + + +```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 }}'; +``` + + diff --git a/docs/azure-docs/providers/azure/resources/deployment_operations/index.md b/docs/azure-docs/providers/azure/resources/deployment_operations/index.md index 815c6bcd46..c6744209c6 100644 --- a/docs/azure-docs/providers/azure/resources/deployment_operations/index.md +++ b/docs/azure-docs/providers/azure/resources/deployment_operations/index.md @@ -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'; @@ -29,9 +29,102 @@ Creates, updates, deletes, gets or lists a deployment_operations re ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. + + +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `text` | Full deployment operation ID. | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | Deployment operation ID. | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | + + + +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | Full deployment operation ID. | +| | `string` | Deployment operation ID. | +| | `object` | Deployment operation properties. | + ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Gets a deployments operation. | +| | `SELECT` | | Gets a deployments operation. | +| | `SELECT` | | Gets a deployments operation. | +| | `SELECT` | | Gets a deployments operation. | +| | `SELECT` | | Gets a deployments operation. | +| | `SELECT` | | Gets all deployments operations for a deployment. | +| | `SELECT` | | Gets all deployments operations for a deployment. | +| | `SELECT` | | Gets all deployments operations for a deployment. | +| | `SELECT` | | Gets all deployments operations for a deployment. | +| | `SELECT` | | Gets all deployments operations for a deployment. | + +## `SELECT` examples + +Gets all deployments operations for a deployment. + + + + +```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 }}'; +``` + + + + +```sql +SELECT +id, +operationId, +properties +FROM azure.resources.deployment_operations +WHERE deploymentName = '{{ deploymentName }}'; +``` + + diff --git a/docs/azure-docs/providers/azure/resources/deployment_operations_at_management_group_scope/index.md b/docs/azure-docs/providers/azure/resources/deployment_operations_at_management_group_scope/index.md deleted file mode 100644 index 0618588d30..0000000000 --- a/docs/azure-docs/providers/azure/resources/deployment_operations_at_management_group_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: deployment_operations_at_management_group_scope -hide_title: false -hide_table_of_contents: false -keywords: - - deployment_operations_at_management_group_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a deployment_operations_at_management_group_scope resource. - -## Overview - - - - -
Namedeployment_operations_at_management_group_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/deployment_operations_at_scope/index.md b/docs/azure-docs/providers/azure/resources/deployment_operations_at_scope/index.md deleted file mode 100644 index 4a2547d545..0000000000 --- a/docs/azure-docs/providers/azure/resources/deployment_operations_at_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: deployment_operations_at_scope -hide_title: false -hide_table_of_contents: false -keywords: - - deployment_operations_at_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a deployment_operations_at_scope resource. - -## Overview - - - - -
Namedeployment_operations_at_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/deployment_operations_at_subscription_scope/index.md b/docs/azure-docs/providers/azure/resources/deployment_operations_at_subscription_scope/index.md deleted file mode 100644 index 5daf70b275..0000000000 --- a/docs/azure-docs/providers/azure/resources/deployment_operations_at_subscription_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: deployment_operations_at_subscription_scope -hide_title: false -hide_table_of_contents: false -keywords: - - deployment_operations_at_subscription_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a deployment_operations_at_subscription_scope resource. - -## Overview - - - - -
Namedeployment_operations_at_subscription_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/deployment_operations_at_tenant_scope/index.md b/docs/azure-docs/providers/azure/resources/deployment_operations_at_tenant_scope/index.md deleted file mode 100644 index 26c2802128..0000000000 --- a/docs/azure-docs/providers/azure/resources/deployment_operations_at_tenant_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: deployment_operations_at_tenant_scope -hide_title: false -hide_table_of_contents: false -keywords: - - deployment_operations_at_tenant_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a deployment_operations_at_tenant_scope resource. - -## Overview - - - - -
Namedeployment_operations_at_tenant_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/deployments/index.md b/docs/azure-docs/providers/azure/resources/deployments/index.md index 72591dbf58..53e4c8f2dc 100644 --- a/docs/azure-docs/providers/azure/resources/deployments/index.md +++ b/docs/azure-docs/providers/azure/resources/deployments/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - deployments - 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'; @@ -29,9 +29,255 @@ Creates, updates, deletes, gets or lists a deployments resource. ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. + + +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `text` | The ID of the deployment. | +| | `text` | The name of the deployment. | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | the location of the deployment. | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | Deployment tags | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | The type of the deployment. | +| | `text` | field from the `properties` object | + + + +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | The ID of the deployment. | +| | `string` | The name of the deployment. | +| | `string` | the location of the deployment. | +| | `object` | Deployment properties with additional details. | +| | `object` | Deployment tags | +| | `string` | The type of the deployment. | + ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Gets a deployment. | +| | `SELECT` | | Gets a deployment. | +| | `SELECT` | | Gets a deployment. | +| | `SELECT` | | Gets a deployment. | +| | `SELECT` | | Gets a deployment. | +| | `SELECT` | | Get all the deployments for a management group. | +| | `SELECT` | | Get all the deployments at the given scope. | +| | `SELECT` | | Get all the deployments for a subscription. | +| | `SELECT` | | Get all the deployments at the tenant scope. | +| | `SELECT` | | Get all the deployments for a resource group. | +| | `INSERT` | | You can provide the template and parameters directly in the request or link to JSON files. | +| | `INSERT` | | You can provide the template and parameters directly in the request or link to JSON files. | +| | `INSERT` | | You can provide the template and parameters directly in the request or link to JSON files. | +| | `INSERT` | | You can provide the template and parameters directly in the request or link to JSON files. | +| | `INSERT` | | You can provide the template and parameters directly in the request or link to JSON files. | +| | `DELETE` | | A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. Deleting a template deployment does not affect the state of the resource group. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. | +| | `EXEC` | | Calculate the hash of the given template. | +| | `EXEC` | | You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resource group partially deployed. | +| | `EXEC` | | You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed. | +| | `EXEC` | | You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed. | +| | `EXEC` | | You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed. | +| | `EXEC` | | You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed. | +| | `EXEC` | | A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. | +| | `EXEC` | | A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. | +| | `EXEC` | | A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. | +| | `EXEC` | | A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code. | +| | `EXEC` | | Exports the template used for specified deployment. | +| | `EXEC` | | Exports the template used for specified deployment. | +| | `EXEC` | | Exports the template used for specified deployment. | +| | `EXEC` | | Exports the template used for specified deployment. | +| | `EXEC` | | Exports the template used for specified deployment. | +| | `EXEC` | | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. | +| | `EXEC` | | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. | +| | `EXEC` | | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. | +| | `EXEC` | | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. | +| | `EXEC` | | Validates whether the specified template is syntactically correct and will be accepted by Azure Resource Manager.. | +| | `EXEC` | | Returns changes that will be made by the deployment if executed at the scope of the resource group. | +| | `EXEC` | | Returns changes that will be made by the deployment if executed at the scope of the management group. | +| | `EXEC` | | Returns changes that will be made by the deployment if executed at the scope of the subscription. | +| | `EXEC` | | Returns changes that will be made by the deployment if executed at the scope of the tenant group. | + +## `SELECT` examples + +Get all the deployments at the tenant scope. + + + + +```sql +SELECT +id, +name, +correlation_id, +debug_setting, +dependencies, +deploymentName, +duration, +error, +location, +mode, +on_error_deployment, +output_resources, +outputs, +parameters, +parameters_link, +providers, +provisioning_state, +resourceGroupName, +subscriptionId, +tags, +template_hash, +template_link, +timestamp, +type, +validated_resources +FROM azure.resources.vw_deployments +; +``` + + + + +```sql +SELECT +id, +name, +location, +properties, +tags, +type +FROM azure.resources.deployments +; +``` + + + +## `INSERT` example + +Use the following StackQL query and manifest file to create a new deployments resource. + + + + +```sql +/*+ create */ +INSERT INTO azure.resources.deployments ( +deploymentName, +scope, +data__properties, +location, +properties, +tags +) +SELECT +'{{ deploymentName }}', +'{{ scope }}', +'{{ data__properties }}', +'{{ location }}', +'{{ properties }}', +'{{ tags }}' +; +``` + + + +```yaml +- name: your_resource_model_name + props: + - name: location + value: string + - name: properties + value: + - name: template + value: object + - name: templateLink + value: + - name: uri + value: string + - name: id + value: string + - name: relativePath + value: string + - name: contentVersion + value: string + - name: queryString + value: string + - name: parameters + value: object + - name: parametersLink + value: + - name: uri + value: string + - name: contentVersion + value: string + - name: mode + value: string + - name: debugSetting + value: + - name: detailLevel + value: string + - name: onErrorDeployment + value: + - name: type + value: string + - name: deploymentName + value: string + - name: expressionEvaluationOptions + value: + - name: scope + value: string + - name: tags + value: object + +``` + + + +## `DELETE` example + +Deletes the specified deployments resource. + +```sql +/*+ delete */ +DELETE FROM azure.resources.deployments +WHERE deploymentName = '{{ deploymentName }}' +AND resourceGroupName = '{{ resourceGroupName }}' +AND subscriptionId = '{{ subscriptionId }}'; +``` diff --git a/docs/azure-docs/providers/azure/resources/deployments_at_management_group_scope/index.md b/docs/azure-docs/providers/azure/resources/deployments_at_management_group_scope/index.md deleted file mode 100644 index e4169cb16b..0000000000 --- a/docs/azure-docs/providers/azure/resources/deployments_at_management_group_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: deployments_at_management_group_scope -hide_title: false -hide_table_of_contents: false -keywords: - - deployments_at_management_group_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a deployments_at_management_group_scope resource. - -## Overview - - - - -
Namedeployments_at_management_group_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/deployments_at_scope/index.md b/docs/azure-docs/providers/azure/resources/deployments_at_scope/index.md deleted file mode 100644 index 99917ace52..0000000000 --- a/docs/azure-docs/providers/azure/resources/deployments_at_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: deployments_at_scope -hide_title: false -hide_table_of_contents: false -keywords: - - deployments_at_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a deployments_at_scope resource. - -## Overview - - - - -
Namedeployments_at_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/deployments_at_subscription_scope/index.md b/docs/azure-docs/providers/azure/resources/deployments_at_subscription_scope/index.md deleted file mode 100644 index 87c866a654..0000000000 --- a/docs/azure-docs/providers/azure/resources/deployments_at_subscription_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: deployments_at_subscription_scope -hide_title: false -hide_table_of_contents: false -keywords: - - deployments_at_subscription_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a deployments_at_subscription_scope resource. - -## Overview - - - - -
Namedeployments_at_subscription_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/deployments_at_tenant_scope/index.md b/docs/azure-docs/providers/azure/resources/deployments_at_tenant_scope/index.md deleted file mode 100644 index c84a833f11..0000000000 --- a/docs/azure-docs/providers/azure/resources/deployments_at_tenant_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: deployments_at_tenant_scope -hide_title: false -hide_table_of_contents: false -keywords: - - deployments_at_tenant_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a deployments_at_tenant_scope resource. - -## Overview - - - - -
Namedeployments_at_tenant_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/index.md b/docs/azure-docs/providers/azure/resources/index.md index 9afef8a334..2235fd961c 100644 --- a/docs/azure-docs/providers/azure/resources/index.md +++ b/docs/azure-docs/providers/azure/resources/index.md @@ -21,7 +21,7 @@ resources service documentation.
-total resources: 23
+total resources: 13
@@ -32,28 +32,18 @@ resources service documentation. - + \ No newline at end of file diff --git a/docs/azure-docs/providers/azure/resources/operations/index.md b/docs/azure-docs/providers/azure/resources/operations/index.md index a2ca40a68a..a194902704 100644 --- a/docs/azure-docs/providers/azure/resources/operations/index.md +++ b/docs/azure-docs/providers/azure/resources/operations/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - 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'; @@ -29,9 +29,32 @@ Creates, updates, deletes, gets or lists a operations resource. ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" | +| | `string` | Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. | +| | `object` | Localized display information for this particular operation. | +| | `boolean` | Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. | +| | `string` | The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" | ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Lists all of the available Microsoft.Resources REST API operations. | +| | `EXEC` | | A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word | + +## `SELECT` examples + +Lists all of the available Microsoft.Resources REST API operations. + + +```sql +SELECT +name, +actionType, +display, +isDataAction, +origin +FROM azure.resources.operations +; +``` \ No newline at end of file diff --git a/docs/azure-docs/providers/azure/resources/provider_resource_types/index.md b/docs/azure-docs/providers/azure/resources/provider_resource_types/index.md index cff33e9eff..e31c992dbe 100644 --- a/docs/azure-docs/providers/azure/resources/provider_resource_types/index.md +++ b/docs/azure-docs/providers/azure/resources/provider_resource_types/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - provider_resource_types - 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'; @@ -29,9 +29,42 @@ Creates, updates, deletes, gets or lists a provider_resource_types ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `array` | The aliases that are supported by this resource type. | +| | `array` | The API profiles for the resource provider. | +| | `array` | The API version. | +| | `string` | The additional capabilities offered by this resource type. | +| | `string` | The default API version. | +| | `array` | The location mappings that are supported by this resource type. | +| | `array` | The collection of locations where this resource type can be created. | +| | `object` | The properties. | +| | `string` | The resource type. | +| | `array` | | ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | List the resource types for a specified resource provider. | + +## `SELECT` examples + +List the resource types for a specified resource provider. + + +```sql +SELECT +aliases, +apiProfiles, +apiVersions, +capabilities, +defaultApiVersion, +locationMappings, +locations, +properties, +resourceType, +zoneMappings +FROM azure.resources.provider_resource_types +WHERE resourceProviderNamespace = '{{ resourceProviderNamespace }}' +AND subscriptionId = '{{ subscriptionId }}'; +``` \ No newline at end of file diff --git a/docs/azure-docs/providers/azure/resources/providers/index.md b/docs/azure-docs/providers/azure/resources/providers/index.md index 37133ec502..2e63e43273 100644 --- a/docs/azure-docs/providers/azure/resources/providers/index.md +++ b/docs/azure-docs/providers/azure/resources/providers/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - providers - 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'; @@ -29,9 +29,40 @@ Creates, updates, deletes, gets or lists a providers resource. ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | The provider ID. | +| | `string` | The namespace of the resource provider. | +| | `string` | The provider authorization consent state. | +| | `string` | The registration policy of the resource provider. | +| | `string` | The registration state of the resource provider. | +| | `array` | The collection of provider resource types. | ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Gets the specified resource provider. | +| | `SELECT` | | Gets the specified resource provider at the tenant level. | +| | `SELECT` | | Gets all resource providers for a subscription. | +| | `SELECT` | | Gets all resource providers for the tenant. | +| | `EXEC` | | Get the provider permissions. | +| | `EXEC` | | Registers a subscription with a resource provider. | +| | `EXEC` | | Registers a management group with a resource provider. Use this operation to register a resource provider with resource types that can be deployed at the management group scope. It does not recursively register subscriptions within the management group. Instead, you must register subscriptions individually. | +| | `EXEC` | | Unregisters a subscription from a resource provider. | + +## `SELECT` examples + +Gets all resource providers for the tenant. + + +```sql +SELECT +id, +namespace, +providerAuthorizationConsentState, +registrationPolicy, +registrationState, +resourceTypes +FROM azure.resources.providers +; +``` \ No newline at end of file diff --git a/docs/azure-docs/providers/azure/resources/providers_at_tenant_scope/index.md b/docs/azure-docs/providers/azure/resources/providers_at_tenant_scope/index.md deleted file mode 100644 index 2676fa440e..0000000000 --- a/docs/azure-docs/providers/azure/resources/providers_at_tenant_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: providers_at_tenant_scope -hide_title: false -hide_table_of_contents: false -keywords: - - providers_at_tenant_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a providers_at_tenant_scope resource. - -## Overview - - - - -
Nameproviders_at_tenant_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/resource_groups/index.md b/docs/azure-docs/providers/azure/resources/resource_groups/index.md index d1a831a366..29489e80a3 100644 --- a/docs/azure-docs/providers/azure/resources/resource_groups/index.md +++ b/docs/azure-docs/providers/azure/resources/resource_groups/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - resource_groups - 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'; @@ -29,9 +29,181 @@ Creates, updates, deletes, gets or lists a resource_groups resource ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. + + +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `text` | The ID of the resource group. | +| | `text` | The name of the resource group. | +| | `text` | The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations. | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | field from the `properties` object | +| | `text` | The tags attached to the resource group. | +| | `text` | The type of the resource group. | + + + +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | The ID of the resource group. | +| | `string` | The name of the resource group. | +| | `string` | The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations. | +| | `string` | The ID of the resource that manages this resource group. | +| | `object` | The resource group properties. | +| | `object` | The tags attached to the resource group. | +| | `string` | The type of the resource group. | + ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Gets a resource group. | +| | `SELECT` | | Gets all the resource groups for a subscription. | +| | `INSERT` | | Creates or updates a resource group. | +| | `DELETE` | | When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations. | +| | `UPDATE` | | Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource group. If a field is unspecified, the current value is retained. | +| | `EXEC` | | Captures the specified resource group as a template. | + +## `SELECT` examples + +Gets all the resource groups for a subscription. + + + + +```sql +SELECT +id, +name, +location, +managed_by, +provisioning_state, +resourceGroupName, +subscriptionId, +tags, +type +FROM azure.resources.vw_resource_groups +WHERE subscriptionId = '{{ subscriptionId }}'; +``` + + + + +```sql +SELECT +id, +name, +location, +managedBy, +properties, +tags, +type +FROM azure.resources.resource_groups +WHERE subscriptionId = '{{ subscriptionId }}'; +``` + + + +## `INSERT` example + +Use the following StackQL query and manifest file to create a new resource_groups resource. + + + + +```sql +/*+ create */ +INSERT INTO azure.resources.resource_groups ( +resourceGroupName, +subscriptionId, +data__location, +properties, +location, +managedBy, +tags +) +SELECT +'{{ resourceGroupName }}', +'{{ subscriptionId }}', +'{{ data__location }}', +'{{ properties }}', +'{{ location }}', +'{{ managedBy }}', +'{{ tags }}' +; +``` + + + +```yaml +- name: your_resource_model_name + props: + - name: id + value: string + - name: name + value: string + - name: type + value: string + - name: properties + value: + - name: provisioningState + value: string + - name: location + value: string + - name: managedBy + value: string + - name: tags + value: object + +``` + + + +## `UPDATE` example + +Updates a resource_groups resource. + +```sql +/*+ update */ +UPDATE azure.resources.resource_groups +SET +name = '{{ name }}', +properties = '{{ properties }}', +managedBy = '{{ managedBy }}', +tags = '{{ tags }}' +WHERE +resourceGroupName = '{{ resourceGroupName }}' +AND subscriptionId = '{{ subscriptionId }}'; +``` + +## `DELETE` example + +Deletes the specified resource_groups resource. + +```sql +/*+ delete */ +DELETE FROM azure.resources.resource_groups +WHERE resourceGroupName = '{{ resourceGroupName }}' +AND subscriptionId = '{{ subscriptionId }}'; +``` diff --git a/docs/azure-docs/providers/azure/resources/resources/index.md b/docs/azure-docs/providers/azure/resources/resources/index.md index 0940d9e4c9..f00bca3298 100644 --- a/docs/azure-docs/providers/azure/resources/resources/index.md +++ b/docs/azure-docs/providers/azure/resources/resources/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - resources - 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'; @@ -29,9 +29,175 @@ Creates, updates, deletes, gets or lists a resources resource. ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | +| | `string` | The name of the resource | +| | `object` | Identity for the resource. | +| | `string` | The kind of the resource. | +| | `string` | ID of the resource that manages this resource. | +| | `object` | Plan for the resource. | +| | `object` | The resource properties. | +| | `object` | The resource model definition representing SKU | +| | `string` | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Gets a resource. | +| | `SELECT` | | Gets a resource by ID. | +| | `SELECT` | | Get all the resources in a subscription. | +| | `SELECT` | | Get all the resources for a resource group. | +| | `INSERT` | | Creates a resource. | +| | `INSERT` | | Create a resource by ID. | +| | `DELETE` | | Deletes a resource. | +| | `DELETE` | | Deletes a resource by ID. | +| | `UPDATE` | | Updates a resource. | +| | `EXEC` | | The resources to be moved must be in the same source resource group in the source subscription being used. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. | +| | `EXEC` | | Updates a resource by ID. | +| | `EXEC` | | This operation checks whether the specified resources can be moved to the target. The resources to be moved must be in the same source resource group in the source subscription being used. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. | + +## `SELECT` examples + +Get all the resources in a subscription. + + +```sql +SELECT +id, +name, +identity, +kind, +managedBy, +plan, +properties, +sku, +type +FROM azure.resources.resources +WHERE subscriptionId = '{{ subscriptionId }}'; +``` +## `INSERT` example + +Use the following StackQL query and manifest file to create a new resources resource. + + + + +```sql +/*+ create */ +INSERT INTO azure.resources.resources ( +api-version, +resourceId, +plan, +properties, +kind, +managedBy, +sku, +identity +) +SELECT +'{{ api-version }}', +'{{ resourceId }}', +'{{ plan }}', +'{{ properties }}', +'{{ kind }}', +'{{ managedBy }}', +'{{ sku }}', +'{{ identity }}' +; +``` + + + +```yaml +- name: your_resource_model_name + props: + - name: plan + value: + - name: name + value: string + - name: publisher + value: string + - name: product + value: string + - name: promotionCode + value: string + - name: version + value: string + - name: properties + value: object + - name: kind + value: string + - name: managedBy + value: string + - name: sku + value: + - name: name + value: string + - name: tier + value: string + - name: size + value: string + - name: family + value: string + - name: capacity + value: integer + - name: identity + value: + - name: principalId + value: string + - name: tenantId + value: string + - name: type + value: string + - name: id + value: string + - name: name + value: string + - name: type + value: string + +``` + + + +## `UPDATE` example + +Updates a resources resource. + +```sql +/*+ update */ +UPDATE azure.resources.resources +SET +plan = '{{ plan }}', +properties = '{{ properties }}', +kind = '{{ kind }}', +managedBy = '{{ managedBy }}', +sku = '{{ sku }}', +identity = '{{ identity }}' +WHERE +api-version = '{{ api-version }}' +AND parentResourcePath = '{{ parentResourcePath }}' +AND resourceGroupName = '{{ resourceGroupName }}' +AND resourceName = '{{ resourceName }}' +AND resourceProviderNamespace = '{{ resourceProviderNamespace }}' +AND resourceType = '{{ resourceType }}' +AND subscriptionId = '{{ subscriptionId }}'; +``` + +## `DELETE` example + +Deletes the specified resources resource. + +```sql +/*+ delete */ +DELETE FROM azure.resources.resources +WHERE api-version = '{{ api-version }}' +AND resourceId = '{{ resourceId }}'; +``` diff --git a/docs/azure-docs/providers/azure/resources/subscriptions/index.md b/docs/azure-docs/providers/azure/resources/subscriptions/index.md index 47ff76b218..2e4a51ac49 100644 --- a/docs/azure-docs/providers/azure/resources/subscriptions/index.md +++ b/docs/azure-docs/providers/azure/resources/subscriptions/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - subscriptions - 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'; @@ -29,9 +29,41 @@ Creates, updates, deletes, gets or lists a subscriptions resource. ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000. | +| | `string` | The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. | +| | `string` | The subscription display name. | +| | `array` | An array containing the tenants managing the subscription. | +| | `string` | The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. | +| | `string` | The subscription ID. | +| | `object` | Subscription policies. | +| | `object` | The tags attached to the subscription. | +| | `string` | The subscription tenant ID. | ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Gets details about a specified subscription. | +| | `SELECT` | | Gets all subscriptions for a tenant. | +| | `EXEC` | | Compares a subscriptions logical zone mapping | + +## `SELECT` examples + +Gets all subscriptions for a tenant. + + +```sql +SELECT +id, +authorizationSource, +displayName, +managedByTenants, +state, +subscriptionId, +subscriptionPolicies, +tags, +tenantId +FROM azure.resources.subscriptions +; +``` \ No newline at end of file diff --git a/docs/azure-docs/providers/azure/resources/subscriptions_locations/index.md b/docs/azure-docs/providers/azure/resources/subscriptions_locations/index.md index a0effff49c..44c561a5e8 100644 --- a/docs/azure-docs/providers/azure/resources/subscriptions_locations/index.md +++ b/docs/azure-docs/providers/azure/resources/subscriptions_locations/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - subscriptions_locations - 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'; @@ -29,9 +29,35 @@ Creates, updates, deletes, gets or lists a subscriptions_locations ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. | +| | `string` | The location name. | +| | `string` | The display name of the location. | +| | `object` | Location metadata information | +| | `string` | The display name of the location and its region. | +| | `string` | The subscription ID. | +| | `string` | The location type. | ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list. | + +## `SELECT` examples + +This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list. + + +```sql +SELECT +id, +name, +displayName, +metadata, +regionalDisplayName, +subscriptionId, +type +FROM azure.resources.subscriptions_locations +WHERE subscriptionId = '{{ subscriptionId }}'; +``` \ No newline at end of file diff --git a/docs/azure-docs/providers/azure/resources/tags/index.md b/docs/azure-docs/providers/azure/resources/tags/index.md index c39b84015d..fa9be83a9f 100644 --- a/docs/azure-docs/providers/azure/resources/tags/index.md +++ b/docs/azure-docs/providers/azure/resources/tags/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - tags - 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'; @@ -29,9 +29,80 @@ Creates, updates, deletes, gets or lists a tags resource. ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | The tag name ID. | +| | `object` | Tag count. | +| | `string` | The tag name. | +| | `array` | The list of tag values. | ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | | +| | `SELECT` | | This operation performs a union of predefined tags, resource tags, resource group tags and subscription tags, and returns a summary of usage for each tag name and value under the given subscription. In case of a large number of tags, this operation may return a previously cached result. | +| | `INSERT` | | This operation allows adding a name to the list of predefined tag names for the given subscription. A tag name can have a maximum of 512 characters and is case-insensitive. Tag names cannot have the following prefixes which are reserved for Azure use: 'microsoft', 'azure', 'windows'. | +| | `INSERT` | | This operation allows adding or replacing the entire set of tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags. | +| | `DELETE` | | This operation allows deleting a name from the list of predefined tag names for the given subscription. The name being deleted must not be in use as a tag name for any resource. All predefined values for the given name must have already been deleted. | +| | `EXEC` | | | +| | `EXEC` | | This operation allows replacing, merging or selectively deleting tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags at the end of the operation. The 'replace' option replaces the entire set of existing tags with a new set. The 'merge' option allows adding tags with new names and updating the values of tags with existing names. The 'delete' option allows selectively deleting tags based on given names or name/value pairs. | + +## `SELECT` examples + + + + +```sql +SELECT +id, +count, +tagName, +values +FROM azure.resources.tags +WHERE scope = '{{ scope }}'; +``` +## `INSERT` example + +Use the following StackQL query and manifest file to create a new tags resource. + + + + +```sql +/*+ create */ +INSERT INTO azure.resources.tags ( +subscriptionId, +tagName +) +SELECT +'{{ subscriptionId }}', +'{{ tagName }}' +; +``` + + + +```yaml +- name: your_resource_model_name + props: [] + +``` + + + +## `DELETE` example + +Deletes the specified tags resource. + +```sql +/*+ delete */ +DELETE FROM azure.resources.tags +WHERE subscriptionId = '{{ subscriptionId }}' +AND tagName = '{{ tagName }}'; +``` diff --git a/docs/azure-docs/providers/azure/resources/tags_at_scope/index.md b/docs/azure-docs/providers/azure/resources/tags_at_scope/index.md deleted file mode 100644 index d3b443c513..0000000000 --- a/docs/azure-docs/providers/azure/resources/tags_at_scope/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: tags_at_scope -hide_title: false -hide_table_of_contents: false -keywords: - - tags_at_scope - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a tags_at_scope resource. - -## Overview - - - - -
Nametags_at_scope
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/tags_value/index.md b/docs/azure-docs/providers/azure/resources/tags_value/index.md deleted file mode 100644 index 3f448ca5e5..0000000000 --- a/docs/azure-docs/providers/azure/resources/tags_value/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: tags_value -hide_title: false -hide_table_of_contents: false -keywords: - - tags_value - - resources - - google - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Creates, updates, deletes, gets or lists a tags_value resource. - -## Overview - - - - -
Nametags_value
TypeResource
Id
- -## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - - -## Methods -| Name | Accessible by | Required Params | Description | -|:-----|:--------------|:----------------|:------------| diff --git a/docs/azure-docs/providers/azure/resources/tags_values/index.md b/docs/azure-docs/providers/azure/resources/tags_values/index.md new file mode 100644 index 0000000000..7003bcb4cd --- /dev/null +++ b/docs/azure-docs/providers/azure/resources/tags_values/index.md @@ -0,0 +1,88 @@ +--- +title: tags_values +hide_title: false +hide_table_of_contents: false +keywords: + - tags_values + - resources + - azure + - microsoft azure + - infrastructure-as-code + - configuration-as-data + - cloud inventory +description: Query, deploy and manage Microsoft Azure infrastructure and resources using SQL +custom_edit_url: null +image: /img/providers/azure/stackql-azure-provider-featured-image.png +--- + +import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +Creates, updates, deletes, gets or lists a tags_values resource. + +## Overview + + + + +
Nametags_values
TypeResource
Id
+ +## Fields +`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. + + +## Methods +| Name | Accessible by | Required Params | Description | +|:-----|:--------------|:----------------|:------------| +| | `INSERT` | | This operation allows adding a value to the list of predefined values for an existing predefined tag name. A tag value can have a maximum of 256 characters. | +| | `DELETE` | | This operation allows deleting a value from the list of predefined values for an existing predefined tag name. The value being deleted must not be in use as a tag value for the given tag name for any resource. | + +## `INSERT` example + +Use the following StackQL query and manifest file to create a new tags_values resource. + + + + +```sql +/*+ create */ +INSERT INTO azure.resources.tags_values ( +subscriptionId, +tagName, +tagValue +) +SELECT +'{{ subscriptionId }}', +'{{ tagName }}', +'{{ tagValue }}' +; +``` + + + +```yaml +- name: your_resource_model_name + props: [] + +``` + + + +## `DELETE` example + +Deletes the specified tags_values resource. + +```sql +/*+ delete */ +DELETE FROM azure.resources.tags_values +WHERE subscriptionId = '{{ subscriptionId }}' +AND tagName = '{{ tagName }}' +AND tagValue = '{{ tagValue }}'; +``` diff --git a/docs/azure-docs/providers/azure/resources/tenants/index.md b/docs/azure-docs/providers/azure/resources/tenants/index.md index f05d632e97..5cf6604162 100644 --- a/docs/azure-docs/providers/azure/resources/tenants/index.md +++ b/docs/azure-docs/providers/azure/resources/tenants/index.md @@ -5,14 +5,14 @@ hide_table_of_contents: false keywords: - tenants - 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'; @@ -29,9 +29,41 @@ Creates, updates, deletes, gets or lists a tenants resource. ## Fields -`SELECT` not supported for this resource, use `SHOW METHODS` to view available operations for the resource. - +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000. | +| | `string` | Country/region name of the address for the tenant. | +| | `string` | Country/region abbreviation for the tenant. | +| | `string` | The default domain for the tenant. | +| | `string` | The display name of the tenant. | +| | `array` | The list of domains for the tenant. | +| | `string` | The tenant's branding logo URL. Only available for 'Home' tenant category. | +| | `string` | Category of the tenant. | +| | `string` | The tenant ID. For example, 00000000-0000-0000-0000-000000000000. | +| | `string` | The tenant type. Only available for 'Home' tenant category. | ## Methods | Name | Accessible by | Required Params | Description | |:-----|:--------------|:----------------|:------------| +| | `SELECT` | | Gets the tenants for your account. | + +## `SELECT` examples + +Gets the tenants for your account. + + +```sql +SELECT +id, +country, +countryCode, +defaultDomain, +displayName, +domains, +tenantBrandingLogoUrl, +tenantCategory, +tenantId, +tenantType +FROM azure.resources.tenants +; +``` \ No newline at end of file