-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
2,383 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"commit": "b8cae07c799a07f2e779a9e301f639e9b85124b1", | ||
"readme": "specification\\appconfiguration\\resource-manager\\readme.md", | ||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\apimanagement\\resource-manager\\readme.md --use=@autorest/[email protected].18.20220329.1", | ||
"commit": "cb00f6da00f783f26204f30ef4d57478cdccbeba", | ||
"readme": "specification/appconfiguration/resource-manager/readme.md", | ||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\appconfiguration\\resource-manager\\readme.md --use=@autorest/[email protected].19.20220408.1 --generate-sample=true", | ||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git", | ||
"release_tool": "@azure-tools/[email protected].1", | ||
"use": "@autorest/[email protected].18.20220329.1" | ||
} | ||
"release_tool": "@azure-tools/[email protected].6", | ||
"use": "@autorest/[email protected].19.20220408.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
sdk/appconfiguration/arm-appconfiguration/samples/v3-beta/javascript/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
100 changes: 100 additions & 0 deletions
100
...ration/arm-appconfiguration/samples/v3-beta/javascript/configurationStoresCreateSample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
* 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 { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
|
||
/** | ||
* This sample demonstrates how to Creates a configuration store with the specified parameters. | ||
* | ||
* @summary Creates a configuration store with the specified parameters. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreate.json | ||
*/ | ||
async function configurationStoresCreate() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const resourceGroupName = "myResourceGroup"; | ||
const configStoreName = "contoso"; | ||
const configStoreCreationParameters = { | ||
location: "westus", | ||
sku: { name: "Standard" }, | ||
tags: { myTag: "myTagValue" }, | ||
}; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const result = await client.configurationStores.beginCreateAndWait( | ||
resourceGroupName, | ||
configStoreName, | ||
configStoreCreationParameters | ||
); | ||
console.log(result); | ||
} | ||
|
||
configurationStoresCreate().catch(console.error); | ||
|
||
/** | ||
* This sample demonstrates how to Creates a configuration store with the specified parameters. | ||
* | ||
* @summary Creates a configuration store with the specified parameters. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreateWithIdentity.json | ||
*/ | ||
async function configurationStoresCreateWithIdentity() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const resourceGroupName = "myResourceGroup"; | ||
const configStoreName = "contoso"; | ||
const configStoreCreationParameters = { | ||
identity: { | ||
type: "SystemAssigned, UserAssigned", | ||
userAssignedIdentities: { | ||
"/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": | ||
{}, | ||
}, | ||
}, | ||
location: "westus", | ||
sku: { name: "Standard" }, | ||
tags: { myTag: "myTagValue" }, | ||
}; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const result = await client.configurationStores.beginCreateAndWait( | ||
resourceGroupName, | ||
configStoreName, | ||
configStoreCreationParameters | ||
); | ||
console.log(result); | ||
} | ||
|
||
configurationStoresCreateWithIdentity().catch(console.error); | ||
|
||
/** | ||
* This sample demonstrates how to Creates a configuration store with the specified parameters. | ||
* | ||
* @summary Creates a configuration store with the specified parameters. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json | ||
*/ | ||
async function configurationStoresCreateWithLocalAuthDisabled() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const resourceGroupName = "myResourceGroup"; | ||
const configStoreName = "contoso"; | ||
const configStoreCreationParameters = { | ||
disableLocalAuth: true, | ||
location: "westus", | ||
sku: { name: "Standard" }, | ||
}; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const result = await client.configurationStores.beginCreateAndWait( | ||
resourceGroupName, | ||
configStoreName, | ||
configStoreCreationParameters | ||
); | ||
console.log(result); | ||
} | ||
|
||
configurationStoresCreateWithLocalAuthDisabled().catch(console.error); |
33 changes: 33 additions & 0 deletions
33
...ration/arm-appconfiguration/samples/v3-beta/javascript/configurationStoresDeleteSample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* 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 { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
|
||
/** | ||
* This sample demonstrates how to Deletes a configuration store. | ||
* | ||
* @summary Deletes a configuration store. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresDelete.json | ||
*/ | ||
async function configurationStoresDelete() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const resourceGroupName = "myResourceGroup"; | ||
const configStoreName = "contoso"; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const result = await client.configurationStores.beginDeleteAndWait( | ||
resourceGroupName, | ||
configStoreName | ||
); | ||
console.log(result); | ||
} | ||
|
||
configurationStoresDelete().catch(console.error); |
30 changes: 30 additions & 0 deletions
30
...on/arm-appconfiguration/samples/v3-beta/javascript/configurationStoresGetDeletedSample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* 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 { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
|
||
/** | ||
* This sample demonstrates how to Gets a deleted Azure app configuration store. | ||
* | ||
* @summary Gets a deleted Azure app configuration store. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/DeletedConfigurationStoresGet.json | ||
*/ | ||
async function deletedConfigurationStoresGet() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const location = "westus"; | ||
const configStoreName = "contoso"; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const result = await client.configurationStores.getDeleted(location, configStoreName); | ||
console.log(result); | ||
} | ||
|
||
deletedConfigurationStoresGet().catch(console.error); |
30 changes: 30 additions & 0 deletions
30
...iguration/arm-appconfiguration/samples/v3-beta/javascript/configurationStoresGetSample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* 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 { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
|
||
/** | ||
* This sample demonstrates how to Gets the properties of the specified configuration store. | ||
* | ||
* @summary Gets the properties of the specified configuration store. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresGet.json | ||
*/ | ||
async function configurationStoresGet() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const resourceGroupName = "myResourceGroup"; | ||
const configStoreName = "contoso"; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const result = await client.configurationStores.get(resourceGroupName, configStoreName); | ||
console.log(result); | ||
} | ||
|
||
configurationStoresGet().catch(console.error); |
32 changes: 32 additions & 0 deletions
32
...pconfiguration/samples/v3-beta/javascript/configurationStoresListByResourceGroupSample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* 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 { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
|
||
/** | ||
* This sample demonstrates how to Lists the configuration stores for a given resource group. | ||
* | ||
* @summary Lists the configuration stores for a given resource group. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListByResourceGroup.json | ||
*/ | ||
async function configurationStoresListByResourceGroup() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const resourceGroupName = "myResourceGroup"; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const resArray = new Array(); | ||
for await (let item of client.configurationStores.listByResourceGroup(resourceGroupName)) { | ||
resArray.push(item); | ||
} | ||
console.log(resArray); | ||
} | ||
|
||
configurationStoresListByResourceGroup().catch(console.error); |
31 changes: 31 additions & 0 deletions
31
...n/arm-appconfiguration/samples/v3-beta/javascript/configurationStoresListDeletedSample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* 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 { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
|
||
/** | ||
* This sample demonstrates how to Gets information about the deleted configuration stores in a subscription. | ||
* | ||
* @summary Gets information about the deleted configuration stores in a subscription. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/DeletedConfigurationStoresList.json | ||
*/ | ||
async function deletedConfigurationStoresList() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const resArray = new Array(); | ||
for await (let item of client.configurationStores.listDeleted()) { | ||
resArray.push(item); | ||
} | ||
console.log(resArray); | ||
} | ||
|
||
deletedConfigurationStoresList().catch(console.error); |
33 changes: 33 additions & 0 deletions
33
...tion/arm-appconfiguration/samples/v3-beta/javascript/configurationStoresListKeysSample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* 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 { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
|
||
/** | ||
* This sample demonstrates how to Lists the access key for the specified configuration store. | ||
* | ||
* @summary Lists the access key for the specified configuration store. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListKeys.json | ||
*/ | ||
async function configurationStoresListKeys() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const resourceGroupName = "myResourceGroup"; | ||
const configStoreName = "contoso"; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const resArray = new Array(); | ||
for await (let item of client.configurationStores.listKeys(resourceGroupName, configStoreName)) { | ||
resArray.push(item); | ||
} | ||
console.log(resArray); | ||
} | ||
|
||
configurationStoresListKeys().catch(console.error); |
31 changes: 31 additions & 0 deletions
31
...guration/arm-appconfiguration/samples/v3-beta/javascript/configurationStoresListSample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* 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 { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); | ||
const { DefaultAzureCredential } = require("@azure/identity"); | ||
|
||
/** | ||
* This sample demonstrates how to Lists the configuration stores for a given subscription. | ||
* | ||
* @summary Lists the configuration stores for a given subscription. | ||
* x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresList.json | ||
*/ | ||
async function configurationStoresList() { | ||
const subscriptionId = "c80fb759-c965-4c6a-9110-9b2b2d038882"; | ||
const credential = new DefaultAzureCredential(); | ||
const client = new AppConfigurationManagementClient(credential, subscriptionId); | ||
const resArray = new Array(); | ||
for await (let item of client.configurationStores.list()) { | ||
resArray.push(item); | ||
} | ||
console.log(resArray); | ||
} | ||
|
||
configurationStoresList().catch(console.error); |
Oops, something went wrong.