지정된 타임스탬프 및 위치에 있는 계정에 있는 gremlin 데이터베이스 및 그래프 콤보 목록을 반환합니다. 이는 시나리오에서 지정된 타임스탬프 및 위치에 존재하는 리소스의 유효성을 검사하는 데 도움이 됩니다. 이 API에는 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' 권한이 필요합니다.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources?api-version=2023-11-15
With optional parameters:
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources?api-version=2023-11-15&restoreLocation={restoreLocation}&restoreTimestampInUtc={restoreTimestampInUtc}
URI 매개 변수
Name |
In(다음 안에) |
필수 |
형식 |
Description |
instanceId
|
path |
True
|
string
|
복원 가능한 데이터베이스 계정의 instanceId GUID입니다.
|
location
|
path |
True
|
string
|
단어와 각 단어 사이의 공백이 대문자로 표시된 Cosmos DB 영역입니다.
|
subscriptionId
|
path |
True
|
string
|
대상 구독의 ID입니다.
|
api-version
|
query |
True
|
string
|
이 작업에 사용할 API 버전입니다.
|
restoreLocation
|
query |
|
string
|
복원 가능한 리소스가 있는 위치입니다.
|
restoreTimestampInUtc
|
query |
|
string
|
복원 가능한 리소스가 있는 타임스탬프입니다.
|
응답
보안
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
사용자 계정 가장
|
예제
CosmosDBRestorableGremlinResourceList
Sample Request
GET https://management.azure.com/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources?api-version=2023-11-15&restoreLocation=WestUS&restoreTimestampInUtc=06/01/2022 4:56
/**
* Samples for RestorableGremlinResources List.
*/
public final class Main {
/*
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/
* CosmosDBRestorableGremlinResourceList.json
*/
/**
* Sample code: CosmosDBRestorableGremlinResourceList.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void cosmosDBRestorableGremlinResourceList(com.azure.resourcemanager.AzureResourceManager azure) {
azure.cosmosDBAccounts().manager().serviceClient().getRestorableGremlinResources().list("WestUS",
"d9b26648-2f53-4541-b3d8-3044f4f9810d", "WestUS", "06/01/2022 4:56", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.cosmosdb import CosmosDBManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-cosmosdb
# USAGE
python cosmos_db_restorable_gremlin_resource_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = CosmosDBManagementClient(
credential=DefaultAzureCredential(),
subscription_id="2296c272-5d55-40d9-bc05-4d56dc2d7588",
)
response = client.restorable_gremlin_resources.list(
location="WestUS",
instance_id="d9b26648-2f53-4541-b3d8-3044f4f9810d",
)
for item in response:
print(item)
# x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableGremlinResourceList.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcosmos_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableGremlinResourceList.json
func ExampleRestorableGremlinResourcesClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRestorableGremlinResourcesClient().NewListPager("WestUS", "d9b26648-2f53-4541-b3d8-3044f4f9810d", &armcosmos.RestorableGremlinResourcesClientListOptions{RestoreLocation: to.Ptr("WestUS"),
RestoreTimestampInUTC: to.Ptr("06/01/2022 4:56"),
})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.RestorableGremlinResourcesListResult = armcosmos.RestorableGremlinResourcesListResult{
// Value: []*armcosmos.RestorableGremlinResourcesGetResult{
// {
// Name: to.Ptr("Database1"),
// Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources"),
// DatabaseName: to.Ptr("Database1"),
// GraphNames: []*string{
// to.Ptr("Graph1")},
// ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database1"),
// },
// {
// Name: to.Ptr("Database2"),
// Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources"),
// DatabaseName: to.Ptr("Database2"),
// GraphNames: []*string{
// to.Ptr("Graph1"),
// to.Ptr("Graph2")},
// ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database2"),
// },
// {
// Name: to.Ptr("Database3"),
// Type: to.Ptr("Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources"),
// DatabaseName: to.Ptr("Database3"),
// GraphNames: []*string{
// },
// ID: to.Ptr("/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database3"),
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.
*
* @summary Return a list of gremlin database and graphs combo that exist on the account at the given timestamp and location. This helps in scenarios to validate what resources exist at given timestamp and location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-11-15/examples/CosmosDBRestorableGremlinResourceList.json
*/
async function cosmosDbRestorableGremlinResourceList() {
const subscriptionId =
process.env["COSMOSDB_SUBSCRIPTION_ID"] || "2296c272-5d55-40d9-bc05-4d56dc2d7588";
const location = "WestUS";
const instanceId = "d9b26648-2f53-4541-b3d8-3044f4f9810d";
const restoreLocation = "WestUS";
const restoreTimestampInUtc = "06/01/2022 4:56";
const options = {
restoreLocation,
restoreTimestampInUtc,
};
const credential = new DefaultAzureCredential();
const client = new CosmosDBManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.restorableGremlinResources.list(location, instanceId, options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"value": [
{
"id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database1",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources",
"name": "Database1",
"databaseName": "Database1",
"graphNames": [
"Graph1"
]
},
{
"id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database2",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources",
"name": "Database2",
"databaseName": "Database2",
"graphNames": [
"Graph1",
"Graph2"
]
},
{
"id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableGremlinResources/Database3",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableGremlinResources",
"name": "Database3",
"databaseName": "Database3",
"graphNames": []
}
]
}
정의
CloudError
서비스의 오류 응답입니다.
ErrorResponse
오류 응답.
Name |
형식 |
Description |
code
|
string
|
오류 코드
|
message
|
string
|
작업이 실패한 이유를 나타내는 오류 메시지입니다.
|
RestorableGremlinResourcesGetResult
복원할 특정 데이터베이스입니다.
Name |
형식 |
Description |
databaseName
|
string
|
복원에 사용할 수 있는 gremlin 데이터베이스의 이름입니다.
|
graphNames
|
string[]
|
복원에 사용할 수 있는 그래프의 이름입니다.
|
id
|
string
|
ARM 리소스의 고유 리소스 식별자입니다.
|
name
|
string
|
ARM 리소스의 이름입니다.
|
type
|
string
|
Azure 리소스의 유형입니다.
|
RestorableGremlinResourcesListResult
복원 가능한 Gremlin 리소스를 포함하는 목록 작업 응답입니다.