ZiWei Chen 2024-05-24 11:09:09 +08:00 коммит произвёл GitHub
Родитель d32460cd31
Коммит dc92c83df0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
249 изменённых файлов: 31508 добавлений и 10 удалений

Просмотреть файл

@ -518,6 +518,9 @@ dependencies:
'@rush-temp/arm-operations':
specifier: file:./projects/arm-operations.tgz
version: file:projects/arm-operations.tgz
'@rush-temp/arm-oracledatabase':
specifier: file:./projects/arm-oracledatabase.tgz
version: file:projects/arm-oracledatabase.tgz
'@rush-temp/arm-orbital':
specifier: file:./projects/arm-orbital.tgz
version: file:projects/arm-orbital.tgz
@ -3323,7 +3326,7 @@ packages:
resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==}
dependencies:
'@types/connect': 3.4.38
'@types/node': 18.19.33
'@types/node': 20.10.8
dev: false
/@types/bunyan@1.8.9:
@ -3400,7 +3403,7 @@ packages:
/@types/express-serve-static-core@4.19.0:
resolution: {integrity: sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==}
dependencies:
'@types/node': 18.19.33
'@types/node': 20.10.8
'@types/qs': 6.9.15
'@types/range-parser': 1.2.7
'@types/send': 0.17.4
@ -3428,7 +3431,7 @@ packages:
resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==}
dependencies:
'@types/jsonfile': 6.1.4
'@types/node': 18.19.33
'@types/node': 20.10.8
dev: false
/@types/fs-extra@8.1.5:
@ -3471,7 +3474,7 @@ packages:
/@types/jsonfile@6.1.4:
resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==}
dependencies:
'@types/node': 18.19.33
'@types/node': 20.10.8
dev: false
/@types/jsonwebtoken@9.0.6:
@ -3536,7 +3539,7 @@ packages:
/@types/node-fetch@2.6.11:
resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==}
dependencies:
'@types/node': 18.19.33
'@types/node': 20.10.8
form-data: 4.0.0
dev: false
@ -3585,7 +3588,7 @@ packages:
/@types/readdir-glob@1.1.5:
resolution: {integrity: sha512-raiuEPUYqXu+nvtY2Pe8s8FEmZ3x5yAH4VkLdihcPdalvsHltomrRC9BzuStrJ9yk06470hS0Crw0f1pXqD+Hg==}
dependencies:
'@types/node': 18.19.33
'@types/node': 20.10.8
dev: false
/@types/resolve@1.20.2:
@ -3604,14 +3607,14 @@ packages:
resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==}
dependencies:
'@types/mime': 1.3.5
'@types/node': 18.19.33
'@types/node': 20.10.8
dev: false
/@types/serve-static@1.15.7:
resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==}
dependencies:
'@types/http-errors': 2.0.4
'@types/node': 18.19.33
'@types/node': 20.10.8
'@types/send': 0.17.4
dev: false
@ -3638,7 +3641,7 @@ packages:
/@types/through@0.0.33:
resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==}
dependencies:
'@types/node': 18.19.33
'@types/node': 20.10.8
dev: false
/@types/triple-beam@1.3.5:
@ -3652,7 +3655,7 @@ packages:
/@types/tunnel@0.0.3:
resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==}
dependencies:
'@types/node': 18.19.33
'@types/node': 20.10.8
dev: false
/@types/underscore@1.11.15:
@ -16356,6 +16359,37 @@ packages:
- supports-color
dev: false
file:projects/arm-oracledatabase.tgz:
resolution: {integrity: sha512-Zu18CpUqyK5BANM7bbY7dJA7THZfBKxs0ldcxLUpB1Hy9cIzhs+23cK7muKegpjR7jiBZE3smWiKxygcP5KLNA==, tarball: file:projects/arm-oracledatabase.tgz}
name: '@rush-temp/arm-oracledatabase'
version: 0.0.0
dependencies:
'@azure-tools/test-credential': 1.1.0
'@azure-tools/test-recorder': 3.5.0
'@azure/abort-controller': 1.1.0
'@azure/core-lro': 2.7.2
'@azure/identity': 4.2.0
'@microsoft/api-extractor': 7.43.7(@types/node@18.19.33)
'@types/chai': 4.3.16
'@types/mocha': 10.0.6
'@types/node': 18.19.33
chai: 4.3.10
cross-env: 7.0.3
dotenv: 16.4.5
mkdirp: 3.0.1
mocha: 10.4.0
rimraf: 5.0.7
ts-node: 10.9.2(@types/node@18.19.33)(typescript@5.4.5)
tslib: 2.6.2
tsx: 4.10.5
typescript: 5.4.5
uglify-js: 3.17.4
transitivePeerDependencies:
- '@swc/core'
- '@swc/wasm'
- supports-color
dev: false
file:projects/arm-orbital.tgz:
resolution: {integrity: sha512-XgaPFuu44TTP53vd6A8PBGRiID2WzXSAx3OYuo15MX2d3Ci02bMHSjsdJ9v1EIp7yFOjJLkJYYYa+C6arUr2AQ==, tarball: file:projects/arm-orbital.tgz}
name: '@rush-temp/arm-orbital'

Просмотреть файл

@ -23,3 +23,4 @@ https://docs.microsoft.com/javascript/api/@azure/arm-storageactions?view=azure-n
https://docs.microsoft.com/javascript/api/@azure/arm-guestconfiguration?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-deviceregistry?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-standbypool?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-oracledatabase?view=azure-node-preview

Просмотреть файл

@ -2206,6 +2206,11 @@
"packageName": "@azure-rest/ai-vision-face",
"projectFolder": "sdk/face/ai-vision-face-rest",
"versionPolicyName": "client"
},
{
"packageName": "@azure/arm-oracledatabase",
"projectFolder": "sdk/oracledatabase/arm-oracledatabase",
"versionPolicyName": "management"
}
]
}

Просмотреть файл

@ -0,0 +1,5 @@
# Release History
## 1.0.0-beta.1 (2024-05-14)
The package of @azure/arm-oracledatabase is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).

Просмотреть файл

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2024 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Просмотреть файл

@ -0,0 +1,109 @@
# Azure OracleDatabaseManagement client library for JavaScript
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure OracleDatabaseManagement client.
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/oracledatabase/arm-oracledatabase) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-oracledatabase) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-oracledatabase?view=azure-node-preview) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
## Getting started
### Currently supported environments
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
- Latest versions of Safari, Chrome, Edge and Firefox.
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
### Prerequisites
- An [Azure subscription][azure_sub].
### Install the `@azure/arm-oracledatabase` package
Install the Azure OracleDatabaseManagement client library for JavaScript with `npm`:
```bash
npm install @azure/arm-oracledatabase
```
### Create and authenticate a `OracleDatabaseManagementClient`
To create a client object to access the Azure OracleDatabaseManagement API, you will need the `endpoint` of your Azure OracleDatabaseManagement resource and a `credential`. The Azure OracleDatabaseManagement client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure OracleDatabaseManagement resource in the [Azure Portal][azure_portal].
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
```bash
npm install @azure/identity
```
You will also need to **register a new AAD application and grant access to Azure OracleDatabaseManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
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 information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
```javascript
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new OracleDatabaseManagementClient(new DefaultAzureCredential(), subscriptionId);
// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new OracleDatabaseManagementClient(credential, subscriptionId);
```
### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
## Key concepts
### OracleDatabaseManagementClient
`OracleDatabaseManagementClient` is the primary interface for developers using the Azure OracleDatabaseManagement client library. Explore the methods on this client object to understand the different features of the Azure OracleDatabaseManagement service that you can access.
## Troubleshooting
### Logging
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
```javascript
const { setLogLevel } = require("@azure/logger");
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
## Next steps
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
## Contributing
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
## Related projects
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Foracledatabase%2Farm-oracledatabase%2FREADME.png)
[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential

Просмотреть файл

@ -0,0 +1,8 @@
{
"commit": "e23546dc961836d2a87a6cb014aadcaa8648ed9b",
"readme": "specification/oracle/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\oracle\\resource-manager\\readme.md --use=@autorest/typescript@6.0.22 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.9",
"use": "@autorest/typescript@6.0.22"
}

Просмотреть файл

@ -0,0 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-oracledatabase.d.ts"
},
"messages": {
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/oracledatabase/arm-oracledatabase",
"Tag": "js/oracledatabase/arm-oracledatabase_46b92b0829"
}

Просмотреть файл

@ -0,0 +1,118 @@
{
"name": "@azure/arm-oracledatabase",
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for OracleDatabaseManagementClient.",
"version": "1.0.0-beta.1",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-oracledatabase.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"mkdirp": "^3.0.1",
"typescript": "~5.4.5",
"uglify-js": "^3.4.9",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.1.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"tsx": "^4.7.1",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"ts-node": "^10.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
"dist-esm/**/*.js",
"dist-esm/**/*.js.map",
"dist-esm/**/*.d.ts",
"dist-esm/**/*.d.ts.map",
"src/**/*.ts",
"README.md",
"LICENSE",
"tsconfig.json",
"review/*",
"CHANGELOG.md",
"types/*"
],
"scripts": {
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"prepack": "npm run build",
"pack": "npm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
"build:test": "echo skipped",
"build:samples": "echo skipped.",
"check-format": "echo skipped",
"execute:samples": "echo skipped",
"format": "echo skipped",
"test": "npm run integration-test",
"test:node": "echo skipped",
"test:browser": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
"unit-test:browser": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:browser": "echo skipped"
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/oracleDatabaseManagementClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/oracledatabase/arm-oracledatabase",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-oracledatabase?view=azure-node-preview"
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,4 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=

Просмотреть файл

@ -0,0 +1,58 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
AutonomousDatabaseBackup,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Create a AutonomousDatabaseBackup
*
* @summary Create a AutonomousDatabaseBackup
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_create.json
*/
async function createAutonomousDatabaseBackup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const adbbackupid = "1711644130";
const resource: AutonomousDatabaseBackup = {
properties: {
autonomousDatabaseId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1",
displayName: "Nightly Backup",
retentionPeriodInDays: 365,
},
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.autonomousDatabaseBackups.beginCreateOrUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
adbbackupid,
resource,
);
console.log(result);
}
async function main() {
createAutonomousDatabaseBackup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Delete a AutonomousDatabaseBackup
*
* @summary Delete a AutonomousDatabaseBackup
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_delete.json
*/
async function deleteAutonomousDatabaseBackup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const adbbackupid = "1711644130";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseBackups.beginDeleteAndWait(
resourceGroupName,
autonomousdatabasename,
adbbackupid,
);
console.log(result);
}
async function main() {
deleteAutonomousDatabaseBackup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a AutonomousDatabaseBackup
*
* @summary Get a AutonomousDatabaseBackup
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_get.json
*/
async function getAutonomousDatabaseBackup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const adbbackupid = "1711644130";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseBackups.get(
resourceGroupName,
autonomousdatabasename,
adbbackupid,
);
console.log(result);
}
async function main() {
getAutonomousDatabaseBackup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,46 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List AutonomousDatabaseBackup resources by AutonomousDatabase
*
* @summary List AutonomousDatabaseBackup resources by AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_listByParent.json
*/
async function listAutonomousDatabaseBackupsByAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabaseBackups.listByAutonomousDatabase(
resourceGroupName,
autonomousdatabasename,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDatabaseBackupsByAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,50 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
AutonomousDatabaseBackupUpdate,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Update a AutonomousDatabaseBackup
*
* @summary Update a AutonomousDatabaseBackup
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_patch.json
*/
async function patchAutonomousDatabaseBackup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const adbbackupid = "1711644130";
const properties: AutonomousDatabaseBackupUpdate = {};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseBackups.beginUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
adbbackupid,
properties,
);
console.log(result);
}
async function main() {
patchAutonomousDatabaseBackup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a AutonomousDatabaseCharacterSet
*
* @summary Get a AutonomousDatabaseCharacterSet
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_get.json
*/
async function getAutonomousDbCharacterSet() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const adbscharsetname = "DATABASE";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseCharacterSets.get(
location,
adbscharsetname,
);
console.log(result);
}
async function main() {
getAutonomousDbCharacterSet();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List AutonomousDatabaseCharacterSet resources by Location
*
* @summary List AutonomousDatabaseCharacterSet resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_listByLocation.json
*/
async function listAutonomousDbCharacterSetsByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabaseCharacterSets.listByLocation(
location,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDbCharacterSetsByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a AutonomousDatabaseNationalCharacterSet
*
* @summary Get a AutonomousDatabaseNationalCharacterSet
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_get.json
*/
async function getAutonomousDbNationalCharacterSet() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const adbsncharsetname = "NATIONAL";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseNationalCharacterSets.get(
location,
adbsncharsetname,
);
console.log(result);
}
async function main() {
getAutonomousDbNationalCharacterSet();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List AutonomousDatabaseNationalCharacterSet resources by Location
*
* @summary List AutonomousDatabaseNationalCharacterSet resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json
*/
async function listAutonomousDbNationalCharacterSetsByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabaseNationalCharacterSets.listByLocation(
location,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDbNationalCharacterSetsByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a AutonomousDbVersion
*
* @summary Get a AutonomousDbVersion
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_get.json
*/
async function getAnAutonomousVersion() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const autonomousdbversionsname = "18.4.0.0";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseVersions.get(
location,
autonomousdbversionsname,
);
console.log(result);
}
async function main() {
getAnAutonomousVersion();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List AutonomousDbVersion resources by Location
*
* @summary List AutonomousDbVersion resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_listByLocation.json
*/
async function listAnAutonomousVersionsByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabaseVersions.listByLocation(
location,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAnAutonomousVersionsByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,111 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
AutonomousDatabase,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Create a AutonomousDatabase
*
* @summary Create a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_create.json
*/
async function createAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const resource: AutonomousDatabase = {
location: "eastus",
properties: {
adminPassword: "",
characterSet: "AL32UTF8",
computeCount: 2,
computeModel: "ECPU",
dataBaseType: "Regular",
dataStorageSizeInTbs: 1,
dbVersion: "18.4.0.0",
displayName: "example_autonomous_databasedb1",
ncharacterSet: "AL16UTF16",
subnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
vnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1",
},
tags: { tagK1: "tagV1" },
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginCreateOrUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
resource,
);
console.log(result);
}
/**
* This sample demonstrates how to Create a AutonomousDatabase
*
* @summary Create a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseClone_create.json
*/
async function createCloneAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const resource: AutonomousDatabase = {
location: "eastus",
properties: {
adminPassword: "",
characterSet: "AL32UTF8",
cloneType: "Full",
computeCount: 2,
computeModel: "ECPU",
dataBaseType: "Clone",
dataStorageSizeInTbs: 1,
displayName: "example_autonomous_databasedb1_clone",
ncharacterSet: "AL16UTF16",
sourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1",
subnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
vnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1",
},
tags: { tagK1: "tagV1" },
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginCreateOrUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
resource,
);
console.log(result);
}
async function main() {
createAutonomousDatabase();
createCloneAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Delete a AutonomousDatabase
*
* @summary Delete a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_delete.json
*/
async function deleteAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginDeleteAndWait(
resourceGroupName,
autonomousdatabasename,
);
console.log(result);
}
async function main() {
deleteAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,48 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
PeerDbDetails,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Perform failover action on Autonomous Database
*
* @summary Perform failover action on Autonomous Database
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_failover.json
*/
async function performFailoverActionOnAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const body: PeerDbDetails = { peerDbId: "peerDbId" };
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginFailoverAndWait(
resourceGroupName,
autonomousdatabasename,
body,
);
console.log(result);
}
async function main() {
performFailoverActionOnAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,52 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
GenerateAutonomousDatabaseWalletDetails,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Generate wallet action on Autonomous Database
*
* @summary Generate wallet action on Autonomous Database
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_generateWallet.json
*/
async function generateWalletActionOnAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const body: GenerateAutonomousDatabaseWalletDetails = {
generateType: "Single",
isRegional: false,
password: "ExamplePassword12345",
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.generateWallet(
resourceGroupName,
autonomousdatabasename,
body,
);
console.log(result);
}
async function main() {
generateWalletActionOnAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a AutonomousDatabase
*
* @summary Get a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_get.json
*/
async function getAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.get(
resourceGroupName,
autonomousdatabasename,
);
console.log(result);
}
async function main() {
getAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,44 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List AutonomousDatabase resources by resource group
*
* @summary List AutonomousDatabase resources by resource group
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listByResourceGroup.json
*/
async function listAutonomousDatabaseByResourceGroup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabases.listByResourceGroup(
resourceGroupName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDatabaseByResourceGroup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List AutonomousDatabase resources by subscription ID
*
* @summary List AutonomousDatabase resources by subscription ID
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listBySubscription.json
*/
async function listAutonomousDatabaseBySubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabases.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDatabaseBySubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,48 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
PeerDbDetails,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Perform switchover action on Autonomous Database
*
* @summary Perform switchover action on Autonomous Database
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_switchover.json
*/
async function performSwitchoverActionOnAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const body: PeerDbDetails = { peerDbId: "peerDbId" };
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginSwitchoverAndWait(
resourceGroupName,
autonomousdatabasename,
body,
);
console.log(result);
}
async function main() {
performSwitchoverActionOnAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,48 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
AutonomousDatabaseUpdate,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Update a AutonomousDatabase
*
* @summary Update a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_patch.json
*/
async function patchAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const properties: AutonomousDatabaseUpdate = {};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
properties,
);
console.log(result);
}
async function main() {
patchAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,44 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Perform add storage capacity on exadata infra
*
* @summary Perform add storage capacity on exadata infra
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_addStorageCapacity.json
*/
async function performAddStorageCapacityOnExadataInfra() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.cloudExadataInfrastructures.beginAddStorageCapacityAndWait(
resourceGroupName,
cloudexadatainfrastructurename,
);
console.log(result);
}
async function main() {
performAddStorageCapacityOnExadataInfra();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,59 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
CloudExadataInfrastructure,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Create a CloudExadataInfrastructure
*
* @summary Create a CloudExadataInfrastructure
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_create.json
*/
async function createExadataInfrastructure() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const resource: CloudExadataInfrastructure = {
location: "eastus",
properties: {
computeCount: 100,
displayName: "infra 1",
shape: "EXADATA.X9M",
storageCount: 10,
},
tags: { tagK1: "tagV1" },
zones: ["1"],
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.cloudExadataInfrastructures.beginCreateOrUpdateAndWait(
resourceGroupName,
cloudexadatainfrastructurename,
resource,
);
console.log(result);
}
async function main() {
createExadataInfrastructure();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Delete a CloudExadataInfrastructure
*
* @summary Delete a CloudExadataInfrastructure
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_delete.json
*/
async function deleteExadataInfrastructure() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudExadataInfrastructures.beginDeleteAndWait(
resourceGroupName,
cloudexadatainfrastructurename,
);
console.log(result);
}
async function main() {
deleteExadataInfrastructure();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a CloudExadataInfrastructure
*
* @summary Get a CloudExadataInfrastructure
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_get.json
*/
async function getExadataInfrastructure() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudExadataInfrastructures.get(
resourceGroupName,
cloudexadatainfrastructurename,
);
console.log(result);
}
async function main() {
getExadataInfrastructure();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,44 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List CloudExadataInfrastructure resources by resource group
*
* @summary List CloudExadataInfrastructure resources by resource group
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listByResourceGroup.json
*/
async function listExadataInfrastructureByResourceGroup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cloudExadataInfrastructures.listByResourceGroup(
resourceGroupName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listExadataInfrastructureByResourceGroup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List CloudExadataInfrastructure resources by subscription ID
*
* @summary List CloudExadataInfrastructure resources by subscription ID
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listBySubscription.json
*/
async function listExadataInfrastructureBySubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cloudExadataInfrastructures.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listExadataInfrastructureBySubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,48 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
CloudExadataInfrastructureUpdate,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Update a CloudExadataInfrastructure
*
* @summary Update a CloudExadataInfrastructure
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_patch.json
*/
async function patchExadataInfrastructure() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const properties: CloudExadataInfrastructureUpdate = {};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudExadataInfrastructures.beginUpdateAndWait(
resourceGroupName,
cloudexadatainfrastructurename,
properties,
);
console.log(result);
}
async function main() {
patchExadataInfrastructure();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,48 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
AddRemoveDbNode,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Add VMs to the VM Cluster
*
* @summary Add VMs to the VM Cluster
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_addVms.json
*/
async function addVMSToVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const body: AddRemoveDbNode = { dbServers: ["ocid1..aaaa", "ocid1..aaaaaa"] };
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudVmClusters.beginAddVmsAndWait(
resourceGroupName,
cloudvmclustername,
body,
);
console.log(result);
}
async function main() {
addVMSToVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,91 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
CloudVmCluster,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Create a CloudVmCluster
*
* @summary Create a CloudVmCluster
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_create.json
*/
async function createVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const resource: CloudVmCluster = {
location: "eastus",
properties: {
backupSubnetCidr: "172.17.5.0/24",
cloudExadataInfrastructureId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/cloudExadataInfrastructures/infra1",
clusterName: "cluster1",
cpuCoreCount: 2,
dataCollectionOptions: {
isDiagnosticsEventsEnabled: false,
isHealthMonitoringEnabled: false,
isIncidentLogsEnabled: false,
},
dataStoragePercentage: 100,
dataStorageSizeInTbs: 1000,
dbNodeStorageSizeInGbs: 1000,
dbServers: ["ocid1..aaaa"],
displayName: "cluster 1",
domain: "domain1",
giVersion: "19.0.0.0",
hostname: "hostname1",
isLocalBackupEnabled: false,
isSparseDiskgroupEnabled: false,
licenseModel: "LicenseIncluded",
memorySizeInGbs: 1000,
nsgCidrs: [
{
destinationPortRange: { max: 1522, min: 1520 },
source: "10.0.0.0/16",
},
{ source: "10.10.0.0/24" },
],
ocpuCount: 3,
scanListenerPortTcp: 1050,
scanListenerPortTcpSsl: 1025,
sshPublicKeys: ["ssh-key 1"],
subnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
timeZone: "UTC",
vnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1",
},
tags: { tagK1: "tagV1" },
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudVmClusters.beginCreateOrUpdateAndWait(
resourceGroupName,
cloudvmclustername,
resource,
);
console.log(result);
}
async function main() {
createVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Delete a CloudVmCluster
*
* @summary Delete a CloudVmCluster
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_delete.json
*/
async function deleteVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudVmClusters.beginDeleteAndWait(
resourceGroupName,
cloudvmclustername,
);
console.log(result);
}
async function main() {
deleteVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a CloudVmCluster
*
* @summary Get a CloudVmCluster
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_get.json
*/
async function getVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudVmClusters.get(
resourceGroupName,
cloudvmclustername,
);
console.log(result);
}
async function main() {
getVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,44 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List CloudVmCluster resources by resource group
*
* @summary List CloudVmCluster resources by resource group
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listByResourceGroup.json
*/
async function listVMClustersByResourceGroup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cloudVmClusters.listByResourceGroup(
resourceGroupName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listVMClustersByResourceGroup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List CloudVmCluster resources by subscription ID
*
* @summary List CloudVmCluster resources by subscription ID
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listBySubscription.json
*/
async function listVMClustersBySubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cloudVmClusters.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listVMClustersBySubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,51 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
PrivateIpAddressesFilter,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List Private IP Addresses by the provided filter
*
* @summary List Private IP Addresses by the provided filter
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listPrivateIpAddresses.json
*/
async function listPrivateIPAddressesForVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const body: PrivateIpAddressesFilter = {
subnetId: "ocid1..aaaaaa",
vnicId: "ocid1..aaaaa",
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudVmClusters.listPrivateIpAddresses(
resourceGroupName,
cloudvmclustername,
body,
);
console.log(result);
}
async function main() {
listPrivateIPAddressesForVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,48 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
AddRemoveDbNode,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Remove VMs from the VM Cluster
*
* @summary Remove VMs from the VM Cluster
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_removeVms.json
*/
async function removeVMSFromVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const body: AddRemoveDbNode = { dbServers: ["ocid1..aaaa"] };
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudVmClusters.beginRemoveVmsAndWait(
resourceGroupName,
cloudvmclustername,
body,
);
console.log(result);
}
async function main() {
removeVMSFromVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,48 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
CloudVmClusterUpdate,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Update a CloudVmCluster
*
* @summary Update a CloudVmCluster
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_patch.json
*/
async function patchVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const properties: CloudVmClusterUpdate = {};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudVmClusters.beginUpdateAndWait(
resourceGroupName,
cloudvmclustername,
properties,
);
console.log(result);
}
async function main() {
patchVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,50 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
DbNodeAction,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to VM actions on DbNode of VM Cluster by the provided filter
*
* @summary VM actions on DbNode of VM Cluster by the provided filter
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_action.json
*/
async function vmActionsOnDbNodesOfVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const dbnodeocid = "ocid1....aaaaaa";
const body: DbNodeAction = { action: "Start" };
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.dbNodes.beginActionAndWait(
resourceGroupName,
cloudvmclustername,
dbnodeocid,
body,
);
console.log(result);
}
async function main() {
vmActionsOnDbNodesOfVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a DbNode
*
* @summary Get a DbNode
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_get.json
*/
async function getDbNode() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const dbnodeocid = "ocid1....aaaaaa";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.dbNodes.get(
resourceGroupName,
cloudvmclustername,
dbnodeocid,
);
console.log(result);
}
async function main() {
getDbNode();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,46 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List DbNode resources by CloudVmCluster
*
* @summary List DbNode resources by CloudVmCluster
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_listByParent.json
*/
async function listDbNodesByVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.dbNodes.listByCloudVmCluster(
resourceGroupName,
cloudvmclustername,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listDbNodesByVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a DbServer
*
* @summary Get a DbServer
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbServers_get.json
*/
async function getDbServerByParent() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const dbserverocid = "ocid1....aaaaaa";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.dbServers.get(
resourceGroupName,
cloudexadatainfrastructurename,
dbserverocid,
);
console.log(result);
}
async function main() {
getDbServerByParent();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,46 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List DbServer resources by CloudExadataInfrastructure
*
* @summary List DbServer resources by CloudExadataInfrastructure
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbServers_listByParent.json
*/
async function listDbServersByExadataInfrastructure() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.dbServers.listByCloudExadataInfrastructure(
resourceGroupName,
cloudexadatainfrastructurename,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listDbServersByExadataInfrastructure();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a DbSystemShape
*
* @summary Get a DbSystemShape
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbSystemShapes_get.json
*/
async function getADbSystemShapeByName() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const dbsystemshapename = "EXADATA.X9M";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.dbSystemShapes.get(location, dbsystemshapename);
console.log(result);
}
async function main() {
getADbSystemShapeByName();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List DbSystemShape resources by Location
*
* @summary List DbSystemShape resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbSystemShapes_listByLocation.json
*/
async function listDbSystemShapesByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.dbSystemShapes.listByLocation(location)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listDbSystemShapesByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a DnsPrivateView
*
* @summary Get a DnsPrivateView
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateViews_get.json
*/
async function getADnsPrivateViewByName() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const dnsprivateviewocid = "ocid1....aaaaaa";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.dnsPrivateViews.get(location, dnsprivateviewocid);
console.log(result);
}
async function main() {
getADnsPrivateViewByName();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List DnsPrivateView resources by Location
*
* @summary List DnsPrivateView resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateViews_listByLocation.json
*/
async function listDnsPrivateViewsByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.dnsPrivateViews.listByLocation(location)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listDnsPrivateViewsByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a DnsPrivateZone
*
* @summary Get a DnsPrivateZone
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateZones_get.json
*/
async function getADnsPrivateZoneByName() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const dnsprivatezonename = "example-dns-private-zone";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.dnsPrivateZones.get(location, dnsprivatezonename);
console.log(result);
}
async function main() {
getADnsPrivateZoneByName();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List DnsPrivateZone resources by Location
*
* @summary List DnsPrivateZone resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateZones_listByLocation.json
*/
async function listDnsPrivateZonesByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.dnsPrivateZones.listByLocation(location)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listDnsPrivateZonesByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a GiVersion
*
* @summary Get a GiVersion
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/giVersions_get.json
*/
async function getAGiVersionByName() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const giversionname = "19.0.0.0";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.giVersions.get(location, giversionname);
console.log(result);
}
async function main() {
getAGiVersionByName();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List GiVersion resources by Location
*
* @summary List GiVersion resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/giVersions_listByLocation.json
*/
async function listGiVersionsByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.giVersions.listByLocation(location)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listGiVersionsByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List the operations for the provider
*
* @summary List the operations for the provider
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/operations_list.json
*/
async function listOperations() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listOperations();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,51 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
OracleSubscription,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Create a OracleSubscription
*
* @summary Create a OracleSubscription
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_create.json
*/
async function createOrUpdateOracleSubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resource: OracleSubscription = {
plan: {
name: "plan1",
product: "product1",
promotionCode: "none",
publisher: "publisher1",
version: "alpha",
},
properties: {},
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.oracleSubscriptions.beginCreateOrUpdateAndWait(resource);
console.log(result);
}
async function main() {
createOrUpdateOracleSubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Delete a OracleSubscription
*
* @summary Delete a OracleSubscription
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_delete.json
*/
async function deleteOracleSubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.oracleSubscriptions.beginDeleteAndWait();
console.log(result);
}
async function main() {
deleteOracleSubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a OracleSubscription
*
* @summary Get a OracleSubscription
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_get.json
*/
async function getOracleSubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.oracleSubscriptions.get();
console.log(result);
}
async function main() {
getOracleSubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List Activation Links
*
* @summary List Activation Links
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listActivationLinks.json
*/
async function listActivationLinksForTheOracleSubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.oracleSubscriptions.beginListActivationLinksAndWait();
console.log(result);
}
async function main() {
listActivationLinksForTheOracleSubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List OracleSubscription resources by subscription ID
*
* @summary List OracleSubscription resources by subscription ID
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listBySubscription.json
*/
async function listOracleSubscriptionsBySubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.oracleSubscriptions.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listOracleSubscriptionsBySubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List Cloud Account Details
*
* @summary List Cloud Account Details
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listCloudAccountDetails.json
*/
async function listCloudAccountDetailsForTheOracleSubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.oracleSubscriptions.beginListCloudAccountDetailsAndWait();
console.log(result);
}
async function main() {
listCloudAccountDetailsForTheOracleSubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List Saas Subscription Details
*
* @summary List Saas Subscription Details
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listSaasSubscriptionDetails.json
*/
async function listSaasSubscriptionDetailsForTheOracleSubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.oracleSubscriptions.beginListSaasSubscriptionDetailsAndWait();
console.log(result);
}
async function main() {
listSaasSubscriptionDetailsForTheOracleSubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
OracleSubscriptionUpdate,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Update a OracleSubscription
*
* @summary Update a OracleSubscription
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_patch.json
*/
async function patchOracleSubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const properties: OracleSubscriptionUpdate = {};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.oracleSubscriptions.beginUpdateAndWait(properties);
console.log(result);
}
async function main() {
patchOracleSubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,53 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
VirtualNetworkAddress,
OracleDatabaseManagementClient,
} from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Create a VirtualNetworkAddress
*
* @summary Create a VirtualNetworkAddress
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_create.json
*/
async function createVirtualNetworkAddress() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const virtualnetworkaddressname = "hostname1";
const resource: VirtualNetworkAddress = {
properties: { ipAddress: "192.168.0.1", vmOcid: "ocid1..aaaa" },
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result =
await client.virtualNetworkAddresses.beginCreateOrUpdateAndWait(
resourceGroupName,
cloudvmclustername,
virtualnetworkaddressname,
resource,
);
console.log(result);
}
async function main() {
createVirtualNetworkAddress();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Delete a VirtualNetworkAddress
*
* @summary Delete a VirtualNetworkAddress
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_delete.json
*/
async function deleteVirtualNetworkAddress() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const virtualnetworkaddressname = "hostname1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.virtualNetworkAddresses.beginDeleteAndWait(
resourceGroupName,
cloudvmclustername,
virtualnetworkaddressname,
);
console.log(result);
}
async function main() {
deleteVirtualNetworkAddress();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a VirtualNetworkAddress
*
* @summary Get a VirtualNetworkAddress
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_get.json
*/
async function getVirtualNetworkAddress() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const virtualnetworkaddressname = "hostname1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.virtualNetworkAddresses.get(
resourceGroupName,
cloudvmclustername,
virtualnetworkaddressname,
);
console.log(result);
}
async function main() {
getVirtualNetworkAddress();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,46 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { OracleDatabaseManagementClient } from "@azure/arm-oracledatabase";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to List VirtualNetworkAddress resources by CloudVmCluster
*
* @summary List VirtualNetworkAddress resources by CloudVmCluster
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_listByParent.json
*/
async function listVirtualNetworkAddressesByVMCluster() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudvmclustername = "cluster1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.virtualNetworkAddresses.listByCloudVmCluster(
resourceGroupName,
cloudvmclustername,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listVirtualNetworkAddressesByVMCluster();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,172 @@
# client library samples for JavaScript (Beta)
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [autonomousDatabaseBackupsCreateOrUpdateSample.js][autonomousdatabasebackupscreateorupdatesample] | Create a AutonomousDatabaseBackup x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_create.json |
| [autonomousDatabaseBackupsDeleteSample.js][autonomousdatabasebackupsdeletesample] | Delete a AutonomousDatabaseBackup x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_delete.json |
| [autonomousDatabaseBackupsGetSample.js][autonomousdatabasebackupsgetsample] | Get a AutonomousDatabaseBackup x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_get.json |
| [autonomousDatabaseBackupsListByAutonomousDatabaseSample.js][autonomousdatabasebackupslistbyautonomousdatabasesample] | List AutonomousDatabaseBackup resources by AutonomousDatabase x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_listByParent.json |
| [autonomousDatabaseBackupsUpdateSample.js][autonomousdatabasebackupsupdatesample] | Update a AutonomousDatabaseBackup x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_patch.json |
| [autonomousDatabaseCharacterSetsGetSample.js][autonomousdatabasecharactersetsgetsample] | Get a AutonomousDatabaseCharacterSet x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_get.json |
| [autonomousDatabaseCharacterSetsListByLocationSample.js][autonomousdatabasecharactersetslistbylocationsample] | List AutonomousDatabaseCharacterSet resources by Location x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_listByLocation.json |
| [autonomousDatabaseNationalCharacterSetsGetSample.js][autonomousdatabasenationalcharactersetsgetsample] | Get a AutonomousDatabaseNationalCharacterSet x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_get.json |
| [autonomousDatabaseNationalCharacterSetsListByLocationSample.js][autonomousdatabasenationalcharactersetslistbylocationsample] | List AutonomousDatabaseNationalCharacterSet resources by Location x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json |
| [autonomousDatabaseVersionsGetSample.js][autonomousdatabaseversionsgetsample] | Get a AutonomousDbVersion x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_get.json |
| [autonomousDatabaseVersionsListByLocationSample.js][autonomousdatabaseversionslistbylocationsample] | List AutonomousDbVersion resources by Location x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_listByLocation.json |
| [autonomousDatabasesCreateOrUpdateSample.js][autonomousdatabasescreateorupdatesample] | Create a AutonomousDatabase x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_create.json |
| [autonomousDatabasesDeleteSample.js][autonomousdatabasesdeletesample] | Delete a AutonomousDatabase x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_delete.json |
| [autonomousDatabasesFailoverSample.js][autonomousdatabasesfailoversample] | Perform failover action on Autonomous Database x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_failover.json |
| [autonomousDatabasesGenerateWalletSample.js][autonomousdatabasesgeneratewalletsample] | Generate wallet action on Autonomous Database x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_generateWallet.json |
| [autonomousDatabasesGetSample.js][autonomousdatabasesgetsample] | Get a AutonomousDatabase x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_get.json |
| [autonomousDatabasesListByResourceGroupSample.js][autonomousdatabaseslistbyresourcegroupsample] | List AutonomousDatabase resources by resource group x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listByResourceGroup.json |
| [autonomousDatabasesListBySubscriptionSample.js][autonomousdatabaseslistbysubscriptionsample] | List AutonomousDatabase resources by subscription ID x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listBySubscription.json |
| [autonomousDatabasesSwitchoverSample.js][autonomousdatabasesswitchoversample] | Perform switchover action on Autonomous Database x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_switchover.json |
| [autonomousDatabasesUpdateSample.js][autonomousdatabasesupdatesample] | Update a AutonomousDatabase x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_patch.json |
| [cloudExadataInfrastructuresAddStorageCapacitySample.js][cloudexadatainfrastructuresaddstoragecapacitysample] | Perform add storage capacity on exadata infra x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_addStorageCapacity.json |
| [cloudExadataInfrastructuresCreateOrUpdateSample.js][cloudexadatainfrastructurescreateorupdatesample] | Create a CloudExadataInfrastructure x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_create.json |
| [cloudExadataInfrastructuresDeleteSample.js][cloudexadatainfrastructuresdeletesample] | Delete a CloudExadataInfrastructure x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_delete.json |
| [cloudExadataInfrastructuresGetSample.js][cloudexadatainfrastructuresgetsample] | Get a CloudExadataInfrastructure x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_get.json |
| [cloudExadataInfrastructuresListByResourceGroupSample.js][cloudexadatainfrastructureslistbyresourcegroupsample] | List CloudExadataInfrastructure resources by resource group x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listByResourceGroup.json |
| [cloudExadataInfrastructuresListBySubscriptionSample.js][cloudexadatainfrastructureslistbysubscriptionsample] | List CloudExadataInfrastructure resources by subscription ID x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listBySubscription.json |
| [cloudExadataInfrastructuresUpdateSample.js][cloudexadatainfrastructuresupdatesample] | Update a CloudExadataInfrastructure x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_patch.json |
| [cloudVMClustersAddVmsSample.js][cloudvmclustersaddvmssample] | Add VMs to the VM Cluster x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_addVms.json |
| [cloudVMClustersCreateOrUpdateSample.js][cloudvmclusterscreateorupdatesample] | Create a CloudVmCluster x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_create.json |
| [cloudVMClustersDeleteSample.js][cloudvmclustersdeletesample] | Delete a CloudVmCluster x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_delete.json |
| [cloudVMClustersGetSample.js][cloudvmclustersgetsample] | Get a CloudVmCluster x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_get.json |
| [cloudVMClustersListByResourceGroupSample.js][cloudvmclusterslistbyresourcegroupsample] | List CloudVmCluster resources by resource group x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listByResourceGroup.json |
| [cloudVMClustersListBySubscriptionSample.js][cloudvmclusterslistbysubscriptionsample] | List CloudVmCluster resources by subscription ID x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listBySubscription.json |
| [cloudVMClustersListPrivateIPAddressesSample.js][cloudvmclusterslistprivateipaddressessample] | List Private IP Addresses by the provided filter x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listPrivateIpAddresses.json |
| [cloudVMClustersRemoveVmsSample.js][cloudvmclustersremovevmssample] | Remove VMs from the VM Cluster x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_removeVms.json |
| [cloudVMClustersUpdateSample.js][cloudvmclustersupdatesample] | Update a CloudVmCluster x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_patch.json |
| [dbNodesActionSample.js][dbnodesactionsample] | VM actions on DbNode of VM Cluster by the provided filter x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_action.json |
| [dbNodesGetSample.js][dbnodesgetsample] | Get a DbNode x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_get.json |
| [dbNodesListByCloudVMClusterSample.js][dbnodeslistbycloudvmclustersample] | List DbNode resources by CloudVmCluster x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_listByParent.json |
| [dbServersGetSample.js][dbserversgetsample] | Get a DbServer x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbServers_get.json |
| [dbServersListByCloudExadataInfrastructureSample.js][dbserverslistbycloudexadatainfrastructuresample] | List DbServer resources by CloudExadataInfrastructure x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbServers_listByParent.json |
| [dbSystemShapesGetSample.js][dbsystemshapesgetsample] | Get a DbSystemShape x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbSystemShapes_get.json |
| [dbSystemShapesListByLocationSample.js][dbsystemshapeslistbylocationsample] | List DbSystemShape resources by Location x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbSystemShapes_listByLocation.json |
| [dnsPrivateViewsGetSample.js][dnsprivateviewsgetsample] | Get a DnsPrivateView x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateViews_get.json |
| [dnsPrivateViewsListByLocationSample.js][dnsprivateviewslistbylocationsample] | List DnsPrivateView resources by Location x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateViews_listByLocation.json |
| [dnsPrivateZonesGetSample.js][dnsprivatezonesgetsample] | Get a DnsPrivateZone x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateZones_get.json |
| [dnsPrivateZonesListByLocationSample.js][dnsprivatezoneslistbylocationsample] | List DnsPrivateZone resources by Location x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateZones_listByLocation.json |
| [giVersionsGetSample.js][giversionsgetsample] | Get a GiVersion x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/giVersions_get.json |
| [giVersionsListByLocationSample.js][giversionslistbylocationsample] | List GiVersion resources by Location x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/giVersions_listByLocation.json |
| [operationsListSample.js][operationslistsample] | List the operations for the provider x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/operations_list.json |
| [oracleSubscriptionsCreateOrUpdateSample.js][oraclesubscriptionscreateorupdatesample] | Create a OracleSubscription x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_create.json |
| [oracleSubscriptionsDeleteSample.js][oraclesubscriptionsdeletesample] | Delete a OracleSubscription x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_delete.json |
| [oracleSubscriptionsGetSample.js][oraclesubscriptionsgetsample] | Get a OracleSubscription x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_get.json |
| [oracleSubscriptionsListActivationLinksSample.js][oraclesubscriptionslistactivationlinkssample] | List Activation Links x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listActivationLinks.json |
| [oracleSubscriptionsListBySubscriptionSample.js][oraclesubscriptionslistbysubscriptionsample] | List OracleSubscription resources by subscription ID x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listBySubscription.json |
| [oracleSubscriptionsListCloudAccountDetailsSample.js][oraclesubscriptionslistcloudaccountdetailssample] | List Cloud Account Details x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listCloudAccountDetails.json |
| [oracleSubscriptionsListSaasSubscriptionDetailsSample.js][oraclesubscriptionslistsaassubscriptiondetailssample] | List Saas Subscription Details x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listSaasSubscriptionDetails.json |
| [oracleSubscriptionsUpdateSample.js][oraclesubscriptionsupdatesample] | Update a OracleSubscription x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_patch.json |
| [virtualNetworkAddressesCreateOrUpdateSample.js][virtualnetworkaddressescreateorupdatesample] | Create a VirtualNetworkAddress x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_create.json |
| [virtualNetworkAddressesDeleteSample.js][virtualnetworkaddressesdeletesample] | Delete a VirtualNetworkAddress x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_delete.json |
| [virtualNetworkAddressesGetSample.js][virtualnetworkaddressesgetsample] | Get a VirtualNetworkAddress x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_get.json |
| [virtualNetworkAddressesListByCloudVMClusterSample.js][virtualnetworkaddresseslistbycloudvmclustersample] | List VirtualNetworkAddress resources by CloudVmCluster x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_listByParent.json |
## Prerequisites
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
You need [an Azure subscription][freesub] to run these sample programs.
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
## Setup
To run the samples using the published version of the package:
1. Install the dependencies using `npm`:
```bash
npm install
```
2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
```bash
node autonomousDatabaseBackupsCreateOrUpdateSample.js
```
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
```bash
npx cross-env ORACLEDATABASE_SUBSCRIPTION_ID="<oracledatabase subscription id>" ORACLEDATABASE_RESOURCE_GROUP="<oracledatabase resource group>" node autonomousDatabaseBackupsCreateOrUpdateSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[autonomousdatabasebackupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseBackupsCreateOrUpdateSample.js
[autonomousdatabasebackupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseBackupsDeleteSample.js
[autonomousdatabasebackupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseBackupsGetSample.js
[autonomousdatabasebackupslistbyautonomousdatabasesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseBackupsListByAutonomousDatabaseSample.js
[autonomousdatabasebackupsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseBackupsUpdateSample.js
[autonomousdatabasecharactersetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseCharacterSetsGetSample.js
[autonomousdatabasecharactersetslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseCharacterSetsListByLocationSample.js
[autonomousdatabasenationalcharactersetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseNationalCharacterSetsGetSample.js
[autonomousdatabasenationalcharactersetslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseNationalCharacterSetsListByLocationSample.js
[autonomousdatabaseversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseVersionsGetSample.js
[autonomousdatabaseversionslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabaseVersionsListByLocationSample.js
[autonomousdatabasescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesCreateOrUpdateSample.js
[autonomousdatabasesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesDeleteSample.js
[autonomousdatabasesfailoversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesFailoverSample.js
[autonomousdatabasesgeneratewalletsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesGenerateWalletSample.js
[autonomousdatabasesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesGetSample.js
[autonomousdatabaseslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesListByResourceGroupSample.js
[autonomousdatabaseslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesListBySubscriptionSample.js
[autonomousdatabasesswitchoversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesSwitchoverSample.js
[autonomousdatabasesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/autonomousDatabasesUpdateSample.js
[cloudexadatainfrastructuresaddstoragecapacitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudExadataInfrastructuresAddStorageCapacitySample.js
[cloudexadatainfrastructurescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudExadataInfrastructuresCreateOrUpdateSample.js
[cloudexadatainfrastructuresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudExadataInfrastructuresDeleteSample.js
[cloudexadatainfrastructuresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudExadataInfrastructuresGetSample.js
[cloudexadatainfrastructureslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudExadataInfrastructuresListByResourceGroupSample.js
[cloudexadatainfrastructureslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudExadataInfrastructuresListBySubscriptionSample.js
[cloudexadatainfrastructuresupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudExadataInfrastructuresUpdateSample.js
[cloudvmclustersaddvmssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersAddVmsSample.js
[cloudvmclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersCreateOrUpdateSample.js
[cloudvmclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersDeleteSample.js
[cloudvmclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersGetSample.js
[cloudvmclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersListByResourceGroupSample.js
[cloudvmclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersListBySubscriptionSample.js
[cloudvmclusterslistprivateipaddressessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersListPrivateIPAddressesSample.js
[cloudvmclustersremovevmssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersRemoveVmsSample.js
[cloudvmclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/cloudVMClustersUpdateSample.js
[dbnodesactionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dbNodesActionSample.js
[dbnodesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dbNodesGetSample.js
[dbnodeslistbycloudvmclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dbNodesListByCloudVMClusterSample.js
[dbserversgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dbServersGetSample.js
[dbserverslistbycloudexadatainfrastructuresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dbServersListByCloudExadataInfrastructureSample.js
[dbsystemshapesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dbSystemShapesGetSample.js
[dbsystemshapeslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dbSystemShapesListByLocationSample.js
[dnsprivateviewsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dnsPrivateViewsGetSample.js
[dnsprivateviewslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dnsPrivateViewsListByLocationSample.js
[dnsprivatezonesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dnsPrivateZonesGetSample.js
[dnsprivatezoneslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/dnsPrivateZonesListByLocationSample.js
[giversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/giVersionsGetSample.js
[giversionslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/giVersionsListByLocationSample.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/operationsListSample.js
[oraclesubscriptionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/oracleSubscriptionsCreateOrUpdateSample.js
[oraclesubscriptionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/oracleSubscriptionsDeleteSample.js
[oraclesubscriptionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/oracleSubscriptionsGetSample.js
[oraclesubscriptionslistactivationlinkssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/oracleSubscriptionsListActivationLinksSample.js
[oraclesubscriptionslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/oracleSubscriptionsListBySubscriptionSample.js
[oraclesubscriptionslistcloudaccountdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/oracleSubscriptionsListCloudAccountDetailsSample.js
[oraclesubscriptionslistsaassubscriptiondetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/oracleSubscriptionsListSaasSubscriptionDetailsSample.js
[oraclesubscriptionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/oracleSubscriptionsUpdateSample.js
[virtualnetworkaddressescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/virtualNetworkAddressesCreateOrUpdateSample.js
[virtualnetworkaddressesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/virtualNetworkAddressesDeleteSample.js
[virtualnetworkaddressesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/virtualNetworkAddressesGetSample.js
[virtualnetworkaddresseslistbycloudvmclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/oracledatabase/arm-oracledatabase/samples/v1-beta/javascript/virtualNetworkAddressesListByCloudVMClusterSample.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-oracledatabase?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/oracledatabase/arm-oracledatabase/README.md

Просмотреть файл

@ -0,0 +1,50 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Create a AutonomousDatabaseBackup
*
* @summary Create a AutonomousDatabaseBackup
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_create.json
*/
async function createAutonomousDatabaseBackup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const adbbackupid = "1711644130";
const resource = {
properties: {
autonomousDatabaseId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1",
displayName: "Nightly Backup",
retentionPeriodInDays: 365,
},
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseBackups.beginCreateOrUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
adbbackupid,
resource,
);
console.log(result);
}
async function main() {
createAutonomousDatabaseBackup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Delete a AutonomousDatabaseBackup
*
* @summary Delete a AutonomousDatabaseBackup
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_delete.json
*/
async function deleteAutonomousDatabaseBackup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const adbbackupid = "1711644130";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseBackups.beginDeleteAndWait(
resourceGroupName,
autonomousdatabasename,
adbbackupid,
);
console.log(result);
}
async function main() {
deleteAutonomousDatabaseBackup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Get a AutonomousDatabaseBackup
*
* @summary Get a AutonomousDatabaseBackup
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_get.json
*/
async function getAutonomousDatabaseBackup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const adbbackupid = "1711644130";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseBackups.get(
resourceGroupName,
autonomousdatabasename,
adbbackupid,
);
console.log(result);
}
async function main() {
getAutonomousDatabaseBackup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to List AutonomousDatabaseBackup resources by AutonomousDatabase
*
* @summary List AutonomousDatabaseBackup resources by AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_listByParent.json
*/
async function listAutonomousDatabaseBackupsByAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabaseBackups.listByAutonomousDatabase(
resourceGroupName,
autonomousdatabasename,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDatabaseBackupsByAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Update a AutonomousDatabaseBackup
*
* @summary Update a AutonomousDatabaseBackup
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_patch.json
*/
async function patchAutonomousDatabaseBackup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const adbbackupid = "1711644130";
const properties = {};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseBackups.beginUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
adbbackupid,
properties,
);
console.log(result);
}
async function main() {
patchAutonomousDatabaseBackup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Get a AutonomousDatabaseCharacterSet
*
* @summary Get a AutonomousDatabaseCharacterSet
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_get.json
*/
async function getAutonomousDbCharacterSet() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const adbscharsetname = "DATABASE";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseCharacterSets.get(location, adbscharsetname);
console.log(result);
}
async function main() {
getAutonomousDbCharacterSet();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to List AutonomousDatabaseCharacterSet resources by Location
*
* @summary List AutonomousDatabaseCharacterSet resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_listByLocation.json
*/
async function listAutonomousDbCharacterSetsByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabaseCharacterSets.listByLocation(location)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDbCharacterSetsByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Get a AutonomousDatabaseNationalCharacterSet
*
* @summary Get a AutonomousDatabaseNationalCharacterSet
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_get.json
*/
async function getAutonomousDbNationalCharacterSet() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const adbsncharsetname = "NATIONAL";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseNationalCharacterSets.get(
location,
adbsncharsetname,
);
console.log(result);
}
async function main() {
getAutonomousDbNationalCharacterSet();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to List AutonomousDatabaseNationalCharacterSet resources by Location
*
* @summary List AutonomousDatabaseNationalCharacterSet resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json
*/
async function listAutonomousDbNationalCharacterSetsByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabaseNationalCharacterSets.listByLocation(location)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDbNationalCharacterSetsByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Get a AutonomousDbVersion
*
* @summary Get a AutonomousDbVersion
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_get.json
*/
async function getAnAutonomousVersion() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const autonomousdbversionsname = "18.4.0.0";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabaseVersions.get(location, autonomousdbversionsname);
console.log(result);
}
async function main() {
getAnAutonomousVersion();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to List AutonomousDbVersion resources by Location
*
* @summary List AutonomousDbVersion resources by Location
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_listByLocation.json
*/
async function listAnAutonomousVersionsByLocation() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabaseVersions.listByLocation(location)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAnAutonomousVersionsByLocation();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,102 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Create a AutonomousDatabase
*
* @summary Create a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_create.json
*/
async function createAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const resource = {
location: "eastus",
properties: {
adminPassword: "",
characterSet: "AL32UTF8",
computeCount: 2,
computeModel: "ECPU",
dataBaseType: "Regular",
dataStorageSizeInTbs: 1,
dbVersion: "18.4.0.0",
displayName: "example_autonomous_databasedb1",
ncharacterSet: "AL16UTF16",
subnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
vnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1",
},
tags: { tagK1: "tagV1" },
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginCreateOrUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
resource,
);
console.log(result);
}
/**
* This sample demonstrates how to Create a AutonomousDatabase
*
* @summary Create a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseClone_create.json
*/
async function createCloneAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const resource = {
location: "eastus",
properties: {
adminPassword: "",
characterSet: "AL32UTF8",
cloneType: "Full",
computeCount: 2,
computeModel: "ECPU",
dataBaseType: "Clone",
dataStorageSizeInTbs: 1,
displayName: "example_autonomous_databasedb1_clone",
ncharacterSet: "AL16UTF16",
sourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1",
subnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
vnetId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1",
},
tags: { tagK1: "tagV1" },
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginCreateOrUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
resource,
);
console.log(result);
}
async function main() {
createAutonomousDatabase();
createCloneAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Delete a AutonomousDatabase
*
* @summary Delete a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_delete.json
*/
async function deleteAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginDeleteAndWait(
resourceGroupName,
autonomousdatabasename,
);
console.log(result);
}
async function main() {
deleteAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Perform failover action on Autonomous Database
*
* @summary Perform failover action on Autonomous Database
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_failover.json
*/
async function performFailoverActionOnAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const body = { peerDbId: "peerDbId" };
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginFailoverAndWait(
resourceGroupName,
autonomousdatabasename,
body,
);
console.log(result);
}
async function main() {
performFailoverActionOnAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Generate wallet action on Autonomous Database
*
* @summary Generate wallet action on Autonomous Database
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_generateWallet.json
*/
async function generateWalletActionOnAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const body = {
generateType: "Single",
isRegional: false,
password: "ExamplePassword12345",
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.generateWallet(
resourceGroupName,
autonomousdatabasename,
body,
);
console.log(result);
}
async function main() {
generateWalletActionOnAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Get a AutonomousDatabase
*
* @summary Get a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_get.json
*/
async function getAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.get(resourceGroupName, autonomousdatabasename);
console.log(result);
}
async function main() {
getAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to List AutonomousDatabase resources by resource group
*
* @summary List AutonomousDatabase resources by resource group
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listByResourceGroup.json
*/
async function listAutonomousDatabaseByResourceGroup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabases.listByResourceGroup(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDatabaseByResourceGroup();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to List AutonomousDatabase resources by subscription ID
*
* @summary List AutonomousDatabase resources by subscription ID
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listBySubscription.json
*/
async function listAutonomousDatabaseBySubscription() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.autonomousDatabases.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listAutonomousDatabaseBySubscription();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Perform switchover action on Autonomous Database
*
* @summary Perform switchover action on Autonomous Database
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_switchover.json
*/
async function performSwitchoverActionOnAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const body = { peerDbId: "peerDbId" };
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginSwitchoverAndWait(
resourceGroupName,
autonomousdatabasename,
body,
);
console.log(result);
}
async function main() {
performSwitchoverActionOnAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Update a AutonomousDatabase
*
* @summary Update a AutonomousDatabase
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_patch.json
*/
async function patchAutonomousDatabase() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const autonomousdatabasename = "databasedb1";
const properties = {};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.autonomousDatabases.beginUpdateAndWait(
resourceGroupName,
autonomousdatabasename,
properties,
);
console.log(result);
}
async function main() {
patchAutonomousDatabase();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Perform add storage capacity on exadata infra
*
* @summary Perform add storage capacity on exadata infra
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_addStorageCapacity.json
*/
async function performAddStorageCapacityOnExadataInfra() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudExadataInfrastructures.beginAddStorageCapacityAndWait(
resourceGroupName,
cloudexadatainfrastructurename,
);
console.log(result);
}
async function main() {
performAddStorageCapacityOnExadataInfra();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,51 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Create a CloudExadataInfrastructure
*
* @summary Create a CloudExadataInfrastructure
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_create.json
*/
async function createExadataInfrastructure() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const resource = {
location: "eastus",
properties: {
computeCount: 100,
displayName: "infra 1",
shape: "EXADATA.X9M",
storageCount: 10,
},
tags: { tagK1: "tagV1" },
zones: ["1"],
};
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudExadataInfrastructures.beginCreateOrUpdateAndWait(
resourceGroupName,
cloudexadatainfrastructurename,
resource,
);
console.log(result);
}
async function main() {
createExadataInfrastructure();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Delete a CloudExadataInfrastructure
*
* @summary Delete a CloudExadataInfrastructure
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_delete.json
*/
async function deleteExadataInfrastructure() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudExadataInfrastructures.beginDeleteAndWait(
resourceGroupName,
cloudexadatainfrastructurename,
);
console.log(result);
}
async function main() {
deleteExadataInfrastructure();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Get a CloudExadataInfrastructure
*
* @summary Get a CloudExadataInfrastructure
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_get.json
*/
async function getExadataInfrastructure() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const cloudexadatainfrastructurename = "infra1";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const result = await client.cloudExadataInfrastructures.get(
resourceGroupName,
cloudexadatainfrastructurename,
);
console.log(result);
}
async function main() {
getExadataInfrastructure();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { OracleDatabaseManagementClient } = require("@azure/arm-oracledatabase");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to List CloudExadataInfrastructure resources by resource group
*
* @summary List CloudExadataInfrastructure resources by resource group
* x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listByResourceGroup.json
*/
async function listExadataInfrastructureByResourceGroup() {
const subscriptionId =
process.env["ORACLEDATABASE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ORACLEDATABASE_RESOURCE_GROUP"] || "rg000";
const credential = new DefaultAzureCredential();
const client = new OracleDatabaseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cloudExadataInfrastructures.listByResourceGroup(
resourceGroupName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listExadataInfrastructureByResourceGroup();
}
main().catch(console.error);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше