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

Introduce CosmosDB RP API 2024-09-01-preview Version #29906

Merged
16 commits merged into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
{
"swagger": "2.0",
"info": {
"title": "Cosmos DB",
"description": "Azure Cosmos DB Chaos Fault REST API",
"version": "2024-09-01-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "Impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/chaosFaults": {
"get": {
"operationId": "ChaosFault_List",
"description": "List Chaos Faults for CosmosDB account.",
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"ChaosFaultList": {
"$ref": "./examples/ChaosFaultList.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "cosmos-db.json#/parameters/accountNameParameter"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/chaosFaultListResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/chaosFaults/{chaosFault}": {
"put": {
"operationId": "ChaosFault_EnableDisable",
"description": "Enable, disable Chaos Fault in a CosmosDB account.",
"x-ms-examples": {
"ChaosFaultEnableDisable": {
"$ref": "./examples/ChaosFaultEnableDisable.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "#/parameters/chaosFault"
},
{
"name": "chaosFaultRequest",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/chaosFaultResource"
},
"description": "A request object to enable/disable the chaos fault."
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/chaosFaultResource"
}
},
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/chaosFaultResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
},
"get": {
"operationId": "ChaosFault_Get",
"description": "Get Chaos Fault for a CosmosdB account for a particular Chaos Fault.",
"x-ms-examples": {
"ChaosFaultGet": {
"$ref": "./examples/ChaosFaultGet.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "#/parameters/chaosFault"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/chaosFaultResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"ProvisioningState": {
"readOnly": true,
"description": "The provisioning state of the resource.",
"type": "string"
},
"chaosFaultResource": {
"description": "A request object to enable/disable the chaos fault",
"type": "object",
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/chaosFaultProperties"
}
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
}
]
},
"chaosFaultProperties": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"Enable",
"Disable"
],
"description": "Indicates whether what action to take for the Chaos Fault.",
"x-ms-enum": {
"name": "SupportedActions",
"modelAsString": false
}
},
"region": {
"type": "string",
"description": "Region of the account where the Chaos Fault is to be enabled/disabled."
},
"databaseName": {
"type": "string",
"description": "Database name."
},
"containerName": {
"type": "string",
"description": "Container name."
},
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "A provisioning state of the Chaos Fault."
}
},
"description": "A request object to enable/disable the chaos fault."
},
"chaosFaultListResponse": {
"type": "object",
"properties": {
"value": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/chaosFaultResource"
},
"description": "List of Chaos Faults."
},
"nextLink": {
"description": "The link used to get the next page of results.",
"type": "string",
"readOnly": true
}
},
"description": "Chaos Fault List Response."
}
},
"parameters": {
"chaosFault": {
"name": "chaosFault",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the ChaosFault.",
"x-ms-parameter-location": "method"
}
}
}
Loading
Loading