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

Add table azure_cosmosdb_restorable_database_account. Closes #595 #596

Merged

Conversation

karanpopat
Copy link
Contributor

@karanpopat karanpopat commented Mar 27, 2023

Integration test logs

Logs
NA

Example query results

Results
> select
  name,
  region,
  account_name,
  creation_time,
  resource_group
from
  azure_cosmosdb_restorable_database_account;
+--------------------------------------+---------+------------------------+---------------------------+----------------------+
| name                                 | region  | account_name           | creation_time             | resource_group       |
+--------------------------------------+---------+------------------------+---------------------------+----------------------+
| 26760d08-5213-41d7-84e2-91889f54a03a | west us | test-acc-restored      | 2023-03-27T16:03:29+05:30 | microsoft.documentdb |
| 082cee20-9cf4-44bc-a107-447c9ce81ab5 | west us | demo-insight-mongo-acc | 2023-03-27T15:06:02+05:30 | microsoft.documentdb |
+--------------------------------------+---------+------------------------+---------------------------+----------------------+
> 
> select
  ra.account_name,
  ra.name as restorable_database_account_name,
  creation_time,
  ra.id as restorable_database_account_id
from
  azure_cosmosdb_restorable_database_account ra,
  azure_cosmosdb_account a
where
  ra.account_name =  a.name
  and ra.subscription_id = a.subscription_id;
+------------------------+--------------------------------------+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| account_name           | restorable_database_account_name     | creation_time             | restorable_database_account_id                                                                                                                                      |
+------------------------+--------------------------------------+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| demo-insight-mongo-acc | 082cee20-9cf4-44bc-a107-447c9ce81ab5 | 2023-03-27T15:06:02+05:30 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/082cee20-9cf4-44bc-a107-447c9ce81ab5 |
| test-acc-restored      | 26760d08-5213-41d7-84e2-91889f54a03a | 2023-03-27T16:03:29+05:30 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/26760d08-5213-41d7-84e2-91889f54a03a |
+------------------------+--------------------------------------+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+

@karanpopat karanpopat requested a review from ParthaI March 27, 2023 17:09
@karanpopat karanpopat self-assigned this Mar 27, 2023
@karanpopat karanpopat linked an issue Mar 27, 2023 that may be closed by this pull request
Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karanpopat please take a look at the review comments!!!

docs/tables/azure_cosmosdb_restorable_database_account.md Outdated Show resolved Hide resolved
docs/tables/azure_cosmosdb_restorable_database_account.md Outdated Show resolved Hide resolved
Transform: transform.FromField("RestorableDatabaseAccountProperties.DeletionTime").Transform(convertDateToTime),
},
{
Name: "type",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a query that gives a count on the number of restorable database accounts per type?

Copy link
Contributor Author

@karanpopat karanpopat Mar 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@misraved type is a common column across tables that shows us the resource type, which is always Microsoft.DocumentDB/locations/restorableDatabaseAccounts for this table.

Did add one for the api_type column

@misraved misraved merged commit 87bcb54 into main Mar 30, 2023
@misraved misraved deleted the 595-add-table-azure_cosmosdb_restorable_database_account branch March 30, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table azure_cosmosdb_restorable_database_account
2 participants