[mgmt] fabric ga (#31384)
https://github.com/Azure/sdk-release-request/issues/5418
This commit is contained in:
Родитель
a93024b597
Коммит
8aaf83f49b
|
@ -1,7 +1,7 @@
|
||||||
# Release History
|
# Release History
|
||||||
|
|
||||||
## 1.0.0-beta.1 (2024-09-27)
|
## 1.0.0 (2024-10-14)
|
||||||
|
|
||||||
### Features Added
|
### Features Added
|
||||||
|
|
||||||
Initial release of the Azure Fabric package
|
This is the first stable version with the package of @azure/arm-fabric
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
"AssetsRepo": "Azure/azure-sdk-assets",
|
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||||
"AssetsRepoPrefixPath": "js",
|
"AssetsRepoPrefixPath": "js",
|
||||||
"TagPrefix": "js/fabric/arm-fabric",
|
"TagPrefix": "js/fabric/arm-fabric",
|
||||||
"Tag": "js/fabric/arm-fabric_79b4172765"
|
"Tag": "js/fabric/arm-fabric_57008420a9"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@azure/arm-fabric",
|
"name": "@azure/arm-fabric",
|
||||||
"version": "1.0.0-beta.1",
|
"version": "1.0.0",
|
||||||
"description": "A generated SDK for FabricClient.",
|
"description": "A generated SDK for FabricClient.",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
"//metadata": {
|
"//metadata": {
|
||||||
"constantPaths": [
|
"constantPaths": [
|
||||||
{
|
{
|
||||||
"path": "src/rest/fabricClient.ts",
|
"path": "src/api/fabricContext.ts",
|
||||||
"prefix": "userAgentInfo"
|
"prefix": "userAgentInfo"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -63,8 +63,7 @@
|
||||||
"@azure/logger": "^1.0.0",
|
"@azure/logger": "^1.0.0",
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
"@azure/core-lro": "^3.0.0",
|
"@azure/core-lro": "^3.0.0",
|
||||||
"@azure/abort-controller": "^2.1.2",
|
"@azure/abort-controller": "^2.1.2"
|
||||||
"@azure/core-paging": "^1.5.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"dotenv": "^16.0.0",
|
"dotenv": "^16.0.0",
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
|
||||||
import { OperationOptions } from '@azure-rest/core-client';
|
|
||||||
|
|
||||||
// @public
|
// @public
|
||||||
export type ActionType = string;
|
export type ActionType = string;
|
||||||
|
|
||||||
|
@ -33,55 +31,6 @@ export interface CheckNameAvailabilityResponse {
|
||||||
// @public
|
// @public
|
||||||
export type CreatedByType = string;
|
export type CreatedByType = string;
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesCheckNameAvailabilityOptionalParams extends OperationOptions {
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesCreateOrUpdateOptionalParams extends OperationOptions {
|
|
||||||
updateIntervalInMs?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesDeleteOptionalParams extends OperationOptions {
|
|
||||||
updateIntervalInMs?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesGetOptionalParams extends OperationOptions {
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesListByResourceGroupOptionalParams extends OperationOptions {
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesListBySubscriptionOptionalParams extends OperationOptions {
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesListSkusForCapacityOptionalParams extends OperationOptions {
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesListSkusOptionalParams extends OperationOptions {
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesResumeOptionalParams extends OperationOptions {
|
|
||||||
updateIntervalInMs?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesSuspendOptionalParams extends OperationOptions {
|
|
||||||
updateIntervalInMs?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface FabricCapacitiesUpdateOptionalParams extends OperationOptions {
|
|
||||||
updateIntervalInMs?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
// @public
|
||||||
export interface FabricCapacity extends TrackedResource {
|
export interface FabricCapacity extends TrackedResource {
|
||||||
properties: FabricCapacityProperties;
|
properties: FabricCapacityProperties;
|
||||||
|
@ -161,7 +110,7 @@ export enum KnownResourceState {
|
||||||
|
|
||||||
// @public
|
// @public
|
||||||
export enum KnownRpSkuTier {
|
export enum KnownRpSkuTier {
|
||||||
fabric = "Fabric"
|
Fabric = "Fabric"
|
||||||
}
|
}
|
||||||
|
|
||||||
// @public
|
// @public
|
||||||
|
@ -181,10 +130,6 @@ export interface OperationDisplay {
|
||||||
readonly resource?: string;
|
readonly resource?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @public
|
|
||||||
export interface OperationsListOptionalParams extends OperationOptions {
|
|
||||||
}
|
|
||||||
|
|
||||||
// @public
|
// @public
|
||||||
export type Origin = string;
|
export type Origin = string;
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ export enum KnownResourceState {
|
||||||
|
|
||||||
// @public
|
// @public
|
||||||
export enum KnownRpSkuTier {
|
export enum KnownRpSkuTier {
|
||||||
fabric = "Fabric"
|
Fabric = "Fabric"
|
||||||
}
|
}
|
||||||
|
|
||||||
// @public
|
// @public
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
@ -14,8 +14,7 @@ async function deleteACapacity() {
|
||||||
const credential = new DefaultAzureCredential();
|
const credential = new DefaultAzureCredential();
|
||||||
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
const client = new FabricClient(credential, subscriptionId);
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
const result = await client.fabricCapacities.delete("TestRG", "azsdktest");
|
await client.fabricCapacities.delete("TestRG", "azsdktest");
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
@ -14,8 +14,7 @@ async function resumeCapacity() {
|
||||||
const credential = new DefaultAzureCredential();
|
const credential = new DefaultAzureCredential();
|
||||||
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
const client = new FabricClient(credential, subscriptionId);
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
const result = await client.fabricCapacities.resume("TestRG", "azsdktest");
|
await client.fabricCapacities.resume("TestRG", "azsdktest");
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
@ -14,8 +14,7 @@ async function suspendCapacity() {
|
||||||
const credential = new DefaultAzureCredential();
|
const credential = new DefaultAzureCredential();
|
||||||
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
const client = new FabricClient(credential, subscriptionId);
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
const result = await client.fabricCapacities.suspend("TestRG", "azsdktest");
|
await client.fabricCapacities.suspend("TestRG", "azsdktest");
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricClient } from "@azure/arm-fabric";
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
import { DefaultAzureCredential } from "@azure/identity";
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
# @azure/arm-fabric client library samples for JavaScript
|
||||||
|
|
||||||
|
These sample programs show how to use the JavaScript client libraries for @azure/arm-fabric in some common scenarios.
|
||||||
|
|
||||||
|
| **File Name** | **Description** |
|
||||||
|
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| [fabricCapacitiesCheckNameAvailabilitySample.js][fabriccapacitieschecknameavailabilitysample] | implements local CheckNameAvailability operations x-ms-original-file: 2023-11-01/FabricCapacities_CheckNameAvailability.json |
|
||||||
|
| [fabricCapacitiesCreateOrUpdateSample.js][fabriccapacitiescreateorupdatesample] | create a FabricCapacity x-ms-original-file: 2023-11-01/FabricCapacities_CreateOrUpdate.json |
|
||||||
|
| [fabricCapacitiesDeleteSample.js][fabriccapacitiesdeletesample] | delete a FabricCapacity x-ms-original-file: 2023-11-01/FabricCapacities_Delete.json |
|
||||||
|
| [fabricCapacitiesGetSample.js][fabriccapacitiesgetsample] | get a FabricCapacity x-ms-original-file: 2023-11-01/FabricCapacities_Get.json |
|
||||||
|
| [fabricCapacitiesListByResourceGroupSample.js][fabriccapacitieslistbyresourcegroupsample] | list FabricCapacity resources by resource group x-ms-original-file: 2023-11-01/FabricCapacities_ListByResourceGroup.json |
|
||||||
|
| [fabricCapacitiesListBySubscriptionSample.js][fabriccapacitieslistbysubscriptionsample] | list FabricCapacity resources by subscription ID x-ms-original-file: 2023-11-01/FabricCapacities_ListBySubscription.json |
|
||||||
|
| [fabricCapacitiesListSkusForCapacitySample.js][fabriccapacitieslistskusforcapacitysample] | list eligible SKUs for a Microsoft Fabric resource x-ms-original-file: 2023-11-01/FabricCapacities_ListSkusForCapacity.json |
|
||||||
|
| [fabricCapacitiesListSkusSample.js][fabriccapacitieslistskussample] | list eligible SKUs for Microsoft Fabric resource provider x-ms-original-file: 2023-11-01/FabricCapacities_ListSkus.json |
|
||||||
|
| [fabricCapacitiesResumeSample.js][fabriccapacitiesresumesample] | resume operation of the specified Fabric capacity instance. x-ms-original-file: 2023-11-01/FabricCapacities_Resume.json |
|
||||||
|
| [fabricCapacitiesSuspendSample.js][fabriccapacitiessuspendsample] | suspend operation of the specified Fabric capacity instance. x-ms-original-file: 2023-11-01/FabricCapacities_Suspend.json |
|
||||||
|
| [fabricCapacitiesUpdateSample.js][fabriccapacitiesupdatesample] | update a FabricCapacity x-ms-original-file: 2023-11-01/FabricCapacities_Update.json |
|
||||||
|
| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2023-11-01/Operations_List.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 fabricCapacitiesCheckNameAvailabilitySample.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 node fabricCapacitiesCheckNameAvailabilitySample.js
|
||||||
|
```
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||||
|
|
||||||
|
[fabriccapacitieschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesCheckNameAvailabilitySample.js
|
||||||
|
[fabriccapacitiescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesCreateOrUpdateSample.js
|
||||||
|
[fabriccapacitiesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesDeleteSample.js
|
||||||
|
[fabriccapacitiesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesGetSample.js
|
||||||
|
[fabriccapacitieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesListByResourceGroupSample.js
|
||||||
|
[fabriccapacitieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesListBySubscriptionSample.js
|
||||||
|
[fabriccapacitieslistskusforcapacitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesListSkusForCapacitySample.js
|
||||||
|
[fabriccapacitieslistskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesListSkusSample.js
|
||||||
|
[fabriccapacitiesresumesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesResumeSample.js
|
||||||
|
[fabriccapacitiessuspendsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesSuspendSample.js
|
||||||
|
[fabriccapacitiesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/fabricCapacitiesUpdateSample.js
|
||||||
|
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/javascript/operationsListSample.js
|
||||||
|
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-fabric?view=azure-node-preview
|
||||||
|
[freesub]: https://azure.microsoft.com/free/
|
||||||
|
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/fabric/arm-fabric/README.md
|
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to implements local CheckNameAvailability operations
|
||||||
|
*
|
||||||
|
* @summary implements local CheckNameAvailability operations
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_CheckNameAvailability.json
|
||||||
|
*/
|
||||||
|
async function checkNameAvailabilityOfACapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const result = await client.fabricCapacities.checkNameAvailability("westcentralus", {
|
||||||
|
name: "azsdktest",
|
||||||
|
type: "Microsoft.Fabric/capacities",
|
||||||
|
});
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
checkNameAvailabilityOfACapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,33 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to create a FabricCapacity
|
||||||
|
*
|
||||||
|
* @summary create a FabricCapacity
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_CreateOrUpdate.json
|
||||||
|
*/
|
||||||
|
async function createOrUpdateACapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const result = await client.fabricCapacities.createOrUpdate("TestRG", "azsdktest", {
|
||||||
|
properties: {
|
||||||
|
administration: {
|
||||||
|
members: ["azsdktest@microsoft.com", "azsdktest2@microsoft.com"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sku: { name: "F2", tier: "Fabric" },
|
||||||
|
location: "westcentralus",
|
||||||
|
});
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
createOrUpdateACapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to delete a FabricCapacity
|
||||||
|
*
|
||||||
|
* @summary delete a FabricCapacity
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Delete.json
|
||||||
|
*/
|
||||||
|
async function deleteACapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
await client.fabricCapacities.delete("TestRG", "azsdktest");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
deleteACapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,25 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to get a FabricCapacity
|
||||||
|
*
|
||||||
|
* @summary get a FabricCapacity
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Get.json
|
||||||
|
*/
|
||||||
|
async function getACapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const result = await client.fabricCapacities.get("TestRG", "azsdktest");
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
getACapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list FabricCapacity resources by resource group
|
||||||
|
*
|
||||||
|
* @summary list FabricCapacity resources by resource group
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_ListByResourceGroup.json
|
||||||
|
*/
|
||||||
|
async function listCapacitiesByResourceGroup() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const resArray = new Array();
|
||||||
|
for await (let item of client.fabricCapacities.listByResourceGroup("TestRG")) {
|
||||||
|
resArray.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(resArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
listCapacitiesByResourceGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list FabricCapacity resources by subscription ID
|
||||||
|
*
|
||||||
|
* @summary list FabricCapacity resources by subscription ID
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_ListBySubscription.json
|
||||||
|
*/
|
||||||
|
async function listCapacitiesBySubscription() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const resArray = new Array();
|
||||||
|
for await (let item of client.fabricCapacities.listBySubscription()) {
|
||||||
|
resArray.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(resArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
listCapacitiesBySubscription();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list eligible SKUs for a Microsoft Fabric resource
|
||||||
|
*
|
||||||
|
* @summary list eligible SKUs for a Microsoft Fabric resource
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_ListSkusForCapacity.json
|
||||||
|
*/
|
||||||
|
async function listEligibleSKUsForAnExistingCapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const resArray = new Array();
|
||||||
|
for await (let item of client.fabricCapacities.listSkusForCapacity("TestRG", "azsdktest")) {
|
||||||
|
resArray.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(resArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
listEligibleSKUsForAnExistingCapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list eligible SKUs for Microsoft Fabric resource provider
|
||||||
|
*
|
||||||
|
* @summary list eligible SKUs for Microsoft Fabric resource provider
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_ListSkus.json
|
||||||
|
*/
|
||||||
|
async function listEligibleSKUsForANewCapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const resArray = new Array();
|
||||||
|
for await (let item of client.fabricCapacities.listSkus()) {
|
||||||
|
resArray.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(resArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
listEligibleSKUsForANewCapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to resume operation of the specified Fabric capacity instance.
|
||||||
|
*
|
||||||
|
* @summary resume operation of the specified Fabric capacity instance.
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Resume.json
|
||||||
|
*/
|
||||||
|
async function resumeCapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
await client.fabricCapacities.resume("TestRG", "azsdktest");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
resumeCapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to suspend operation of the specified Fabric capacity instance.
|
||||||
|
*
|
||||||
|
* @summary suspend operation of the specified Fabric capacity instance.
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Suspend.json
|
||||||
|
*/
|
||||||
|
async function suspendCapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
await client.fabricCapacities.suspend("TestRG", "azsdktest");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
suspendCapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to update a FabricCapacity
|
||||||
|
*
|
||||||
|
* @summary update a FabricCapacity
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Update.json
|
||||||
|
*/
|
||||||
|
async function updateCapacityProperties() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const result = await client.fabricCapacities.update("TestRG", "azsdktest", {
|
||||||
|
sku: { name: "F8", tier: "Fabric" },
|
||||||
|
tags: { testKey: "testValue" },
|
||||||
|
properties: { administration: { members: ["azsdktest2@microsoft.com"] } },
|
||||||
|
});
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
updateCapacityProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
const { FabricClient } = require("@azure/arm-fabric");
|
||||||
|
const { DefaultAzureCredential } = require("@azure/identity");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list the operations for the provider
|
||||||
|
*
|
||||||
|
* @summary list the operations for the provider
|
||||||
|
* x-ms-original-file: 2023-11-01/Operations_List.json
|
||||||
|
*/
|
||||||
|
async function listOperations() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "00000000-0000-0000-0000-00000000000";
|
||||||
|
const client = new FabricClient(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,33 @@
|
||||||
|
{
|
||||||
|
"name": "@azure-samples/arm-fabric-js",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "@azure/arm-fabric client library samples for JavaScript",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
|
||||||
|
"directory": "sdk/fabric/arm-fabric"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"node",
|
||||||
|
"azure",
|
||||||
|
"cloud",
|
||||||
|
"typescript",
|
||||||
|
"browser",
|
||||||
|
"isomorphic"
|
||||||
|
],
|
||||||
|
"author": "Microsoft Corporation",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/fabric/arm-fabric",
|
||||||
|
"dependencies": {
|
||||||
|
"@azure/arm-fabric": "latest",
|
||||||
|
"dotenv": "latest",
|
||||||
|
"@azure/identity": "^4.2.1"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
# Feel free to add your own environment variables.
|
|
@ -0,0 +1,85 @@
|
||||||
|
# @azure/arm-fabric client library samples for TypeScript
|
||||||
|
|
||||||
|
These sample programs show how to use the TypeScript client libraries for @azure/arm-fabric in some common scenarios.
|
||||||
|
|
||||||
|
| **File Name** | **Description** |
|
||||||
|
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| [fabricCapacitiesCheckNameAvailabilitySample.ts][fabriccapacitieschecknameavailabilitysample] | implements local CheckNameAvailability operations x-ms-original-file: 2023-11-01/FabricCapacities_CheckNameAvailability.json |
|
||||||
|
| [fabricCapacitiesCreateOrUpdateSample.ts][fabriccapacitiescreateorupdatesample] | create a FabricCapacity x-ms-original-file: 2023-11-01/FabricCapacities_CreateOrUpdate.json |
|
||||||
|
| [fabricCapacitiesDeleteSample.ts][fabriccapacitiesdeletesample] | delete a FabricCapacity x-ms-original-file: 2023-11-01/FabricCapacities_Delete.json |
|
||||||
|
| [fabricCapacitiesGetSample.ts][fabriccapacitiesgetsample] | get a FabricCapacity x-ms-original-file: 2023-11-01/FabricCapacities_Get.json |
|
||||||
|
| [fabricCapacitiesListByResourceGroupSample.ts][fabriccapacitieslistbyresourcegroupsample] | list FabricCapacity resources by resource group x-ms-original-file: 2023-11-01/FabricCapacities_ListByResourceGroup.json |
|
||||||
|
| [fabricCapacitiesListBySubscriptionSample.ts][fabriccapacitieslistbysubscriptionsample] | list FabricCapacity resources by subscription ID x-ms-original-file: 2023-11-01/FabricCapacities_ListBySubscription.json |
|
||||||
|
| [fabricCapacitiesListSkusForCapacitySample.ts][fabriccapacitieslistskusforcapacitysample] | list eligible SKUs for a Microsoft Fabric resource x-ms-original-file: 2023-11-01/FabricCapacities_ListSkusForCapacity.json |
|
||||||
|
| [fabricCapacitiesListSkusSample.ts][fabriccapacitieslistskussample] | list eligible SKUs for Microsoft Fabric resource provider x-ms-original-file: 2023-11-01/FabricCapacities_ListSkus.json |
|
||||||
|
| [fabricCapacitiesResumeSample.ts][fabriccapacitiesresumesample] | resume operation of the specified Fabric capacity instance. x-ms-original-file: 2023-11-01/FabricCapacities_Resume.json |
|
||||||
|
| [fabricCapacitiesSuspendSample.ts][fabriccapacitiessuspendsample] | suspend operation of the specified Fabric capacity instance. x-ms-original-file: 2023-11-01/FabricCapacities_Suspend.json |
|
||||||
|
| [fabricCapacitiesUpdateSample.ts][fabriccapacitiesupdatesample] | update a FabricCapacity x-ms-original-file: 2023-11-01/FabricCapacities_Update.json |
|
||||||
|
| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2023-11-01/Operations_List.json |
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
|
||||||
|
|
||||||
|
Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install -g typescript
|
||||||
|
```
|
||||||
|
|
||||||
|
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. Compile the samples:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 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.
|
||||||
|
|
||||||
|
4. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
node dist/fabricCapacitiesCheckNameAvailabilitySample.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 node dist/fabricCapacitiesCheckNameAvailabilitySample.js
|
||||||
|
```
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||||
|
|
||||||
|
[fabriccapacitieschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesCheckNameAvailabilitySample.ts
|
||||||
|
[fabriccapacitiescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesCreateOrUpdateSample.ts
|
||||||
|
[fabriccapacitiesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesDeleteSample.ts
|
||||||
|
[fabriccapacitiesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesGetSample.ts
|
||||||
|
[fabriccapacitieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesListByResourceGroupSample.ts
|
||||||
|
[fabriccapacitieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesListBySubscriptionSample.ts
|
||||||
|
[fabriccapacitieslistskusforcapacitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesListSkusForCapacitySample.ts
|
||||||
|
[fabriccapacitieslistskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesListSkusSample.ts
|
||||||
|
[fabriccapacitiesresumesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesResumeSample.ts
|
||||||
|
[fabriccapacitiessuspendsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesSuspendSample.ts
|
||||||
|
[fabriccapacitiesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/fabricCapacitiesUpdateSample.ts
|
||||||
|
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/fabric/arm-fabric/samples/v1/typescript/src/operationsListSample.ts
|
||||||
|
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-fabric?view=azure-node-preview
|
||||||
|
[freesub]: https://azure.microsoft.com/free/
|
||||||
|
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/fabric/arm-fabric/README.md
|
||||||
|
[typescript]: https://www.typescriptlang.org/docs/home.html
|
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"name": "@azure-samples/arm-fabric-ts",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "@azure/arm-fabric client library samples for TypeScript",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"prebuild": "rimraf dist/"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
|
||||||
|
"directory": "sdk/fabric/arm-fabric"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"node",
|
||||||
|
"azure",
|
||||||
|
"cloud",
|
||||||
|
"typescript",
|
||||||
|
"browser",
|
||||||
|
"isomorphic"
|
||||||
|
],
|
||||||
|
"author": "Microsoft Corporation",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/fabric/arm-fabric",
|
||||||
|
"dependencies": {
|
||||||
|
"@azure/arm-fabric": "latest",
|
||||||
|
"dotenv": "latest",
|
||||||
|
"@azure/identity": "^4.2.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^18.0.0",
|
||||||
|
"typescript": "~5.6.2",
|
||||||
|
"rimraf": "latest"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
# Feel free to add your own environment variables.
|
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to implements local CheckNameAvailability operations
|
||||||
|
*
|
||||||
|
* @summary implements local CheckNameAvailability operations
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_CheckNameAvailability.json
|
||||||
|
*/
|
||||||
|
async function checkNameAvailabilityOfACapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const result = await client.fabricCapacities.checkNameAvailability(
|
||||||
|
"westcentralus",
|
||||||
|
{ name: "azsdktest", type: "Microsoft.Fabric/capacities" },
|
||||||
|
);
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
checkNameAvailabilityOfACapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,37 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to create a FabricCapacity
|
||||||
|
*
|
||||||
|
* @summary create a FabricCapacity
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_CreateOrUpdate.json
|
||||||
|
*/
|
||||||
|
async function createOrUpdateACapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const result = await client.fabricCapacities.createOrUpdate(
|
||||||
|
"TestRG",
|
||||||
|
"azsdktest",
|
||||||
|
{
|
||||||
|
properties: {
|
||||||
|
administration: {
|
||||||
|
members: ["azsdktest@microsoft.com", "azsdktest2@microsoft.com"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sku: { name: "F2", tier: "Fabric" },
|
||||||
|
location: "westcentralus",
|
||||||
|
},
|
||||||
|
);
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
createOrUpdateACapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to delete a FabricCapacity
|
||||||
|
*
|
||||||
|
* @summary delete a FabricCapacity
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Delete.json
|
||||||
|
*/
|
||||||
|
async function deleteACapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
await client.fabricCapacities.delete("TestRG", "azsdktest");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
deleteACapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,25 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to get a FabricCapacity
|
||||||
|
*
|
||||||
|
* @summary get a FabricCapacity
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Get.json
|
||||||
|
*/
|
||||||
|
async function getACapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const result = await client.fabricCapacities.get("TestRG", "azsdktest");
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
getACapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list FabricCapacity resources by resource group
|
||||||
|
*
|
||||||
|
* @summary list FabricCapacity resources by resource group
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_ListByResourceGroup.json
|
||||||
|
*/
|
||||||
|
async function listCapacitiesByResourceGroup() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const resArray = new Array();
|
||||||
|
for await (let item of client.fabricCapacities.listByResourceGroup(
|
||||||
|
"TestRG",
|
||||||
|
)) {
|
||||||
|
resArray.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(resArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
listCapacitiesByResourceGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list FabricCapacity resources by subscription ID
|
||||||
|
*
|
||||||
|
* @summary list FabricCapacity resources by subscription ID
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_ListBySubscription.json
|
||||||
|
*/
|
||||||
|
async function listCapacitiesBySubscription() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const resArray = new Array();
|
||||||
|
for await (let item of client.fabricCapacities.listBySubscription()) {
|
||||||
|
resArray.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(resArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
listCapacitiesBySubscription();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list eligible SKUs for a Microsoft Fabric resource
|
||||||
|
*
|
||||||
|
* @summary list eligible SKUs for a Microsoft Fabric resource
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_ListSkusForCapacity.json
|
||||||
|
*/
|
||||||
|
async function listEligibleSKUsForAnExistingCapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const resArray = new Array();
|
||||||
|
for await (let item of client.fabricCapacities.listSkusForCapacity(
|
||||||
|
"TestRG",
|
||||||
|
"azsdktest",
|
||||||
|
)) {
|
||||||
|
resArray.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(resArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
listEligibleSKUsForAnExistingCapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list eligible SKUs for Microsoft Fabric resource provider
|
||||||
|
*
|
||||||
|
* @summary list eligible SKUs for Microsoft Fabric resource provider
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_ListSkus.json
|
||||||
|
*/
|
||||||
|
async function listEligibleSKUsForANewCapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const resArray = new Array();
|
||||||
|
for await (let item of client.fabricCapacities.listSkus()) {
|
||||||
|
resArray.push(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(resArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
listEligibleSKUsForANewCapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to resume operation of the specified Fabric capacity instance.
|
||||||
|
*
|
||||||
|
* @summary resume operation of the specified Fabric capacity instance.
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Resume.json
|
||||||
|
*/
|
||||||
|
async function resumeCapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
await client.fabricCapacities.resume("TestRG", "azsdktest");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
resumeCapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to suspend operation of the specified Fabric capacity instance.
|
||||||
|
*
|
||||||
|
* @summary suspend operation of the specified Fabric capacity instance.
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Suspend.json
|
||||||
|
*/
|
||||||
|
async function suspendCapacity() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
await client.fabricCapacities.suspend("TestRG", "azsdktest");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
suspendCapacity();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to update a FabricCapacity
|
||||||
|
*
|
||||||
|
* @summary update a FabricCapacity
|
||||||
|
* x-ms-original-file: 2023-11-01/FabricCapacities_Update.json
|
||||||
|
*/
|
||||||
|
async function updateCapacityProperties() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C";
|
||||||
|
const client = new FabricClient(credential, subscriptionId);
|
||||||
|
const result = await client.fabricCapacities.update("TestRG", "azsdktest", {
|
||||||
|
sku: { name: "F8", tier: "Fabric" },
|
||||||
|
tags: { testKey: "testValue" },
|
||||||
|
properties: { administration: { members: ["azsdktest2@microsoft.com"] } },
|
||||||
|
});
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
updateCapacityProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright (c) Microsoft Corporation.
|
||||||
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
|
import { FabricClient } from "@azure/arm-fabric";
|
||||||
|
import { DefaultAzureCredential } from "@azure/identity";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This sample demonstrates how to list the operations for the provider
|
||||||
|
*
|
||||||
|
* @summary list the operations for the provider
|
||||||
|
* x-ms-original-file: 2023-11-01/Operations_List.json
|
||||||
|
*/
|
||||||
|
async function listOperations() {
|
||||||
|
const credential = new DefaultAzureCredential();
|
||||||
|
const subscriptionId = "00000000-0000-0000-0000-00000000000";
|
||||||
|
const client = new FabricClient(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,17 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2020",
|
||||||
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"strict": true,
|
||||||
|
"alwaysStrict": true,
|
||||||
|
"outDir": "dist",
|
||||||
|
"rootDir": "src"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -2,46 +2,50 @@
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fabricCapacityPropertiesSerializer,
|
FabricContext as Client,
|
||||||
rpSkuSerializer,
|
FabricCapacitiesCheckNameAvailabilityOptionalParams,
|
||||||
fabricCapacityUpdatePropertiesSerializer,
|
FabricCapacitiesCreateOrUpdateOptionalParams,
|
||||||
FabricCapacity,
|
FabricCapacitiesDeleteOptionalParams,
|
||||||
FabricCapacityUpdate,
|
FabricCapacitiesGetOptionalParams,
|
||||||
CheckNameAvailabilityRequest,
|
FabricCapacitiesListByResourceGroupOptionalParams,
|
||||||
CheckNameAvailabilityResponse,
|
FabricCapacitiesListBySubscriptionOptionalParams,
|
||||||
RpSkuDetailsForExistingResource,
|
FabricCapacitiesListSkusForCapacityOptionalParams,
|
||||||
RpSkuDetailsForNewResource,
|
FabricCapacitiesListSkusOptionalParams,
|
||||||
_FabricCapacityListResult,
|
FabricCapacitiesResumeOptionalParams,
|
||||||
_RpSkuEnumerationForExistingResourceResult,
|
FabricCapacitiesSuspendOptionalParams,
|
||||||
_RpSkuEnumerationForNewResourceResult,
|
FabricCapacitiesUpdateOptionalParams,
|
||||||
} from "../../models/models.js";
|
} from "../index.js";
|
||||||
import { FabricContext as Client } from "../index.js";
|
|
||||||
import {
|
import {
|
||||||
StreamableMethod,
|
FabricCapacity,
|
||||||
operationOptionsToRequestParameters,
|
fabricCapacitySerializer,
|
||||||
PathUncheckedResponse,
|
fabricCapacityDeserializer,
|
||||||
createRestError,
|
FabricCapacityUpdate,
|
||||||
} from "@azure-rest/core-client";
|
fabricCapacityUpdateSerializer,
|
||||||
import { serializeRecord } from "../../helpers/serializerHelpers.js";
|
_FabricCapacityListResult,
|
||||||
|
_fabricCapacityListResultDeserializer,
|
||||||
|
CheckNameAvailabilityRequest,
|
||||||
|
checkNameAvailabilityRequestSerializer,
|
||||||
|
CheckNameAvailabilityResponse,
|
||||||
|
checkNameAvailabilityResponseDeserializer,
|
||||||
|
_RpSkuEnumerationForExistingResourceResult,
|
||||||
|
_rpSkuEnumerationForExistingResourceResultDeserializer,
|
||||||
|
RpSkuDetailsForExistingResource,
|
||||||
|
_RpSkuEnumerationForNewResourceResult,
|
||||||
|
_rpSkuEnumerationForNewResourceResultDeserializer,
|
||||||
|
RpSkuDetailsForNewResource,
|
||||||
|
} from "../../models/models.js";
|
||||||
import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js";
|
import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js";
|
||||||
import {
|
import {
|
||||||
PagedAsyncIterableIterator,
|
PagedAsyncIterableIterator,
|
||||||
buildPagedAsyncIterator,
|
buildPagedAsyncIterator,
|
||||||
} from "../../static-helpers/pagingHelpers.js";
|
} from "../../static-helpers/pagingHelpers.js";
|
||||||
import { PollerLike, OperationState } from "@azure/core-lro";
|
|
||||||
import {
|
import {
|
||||||
FabricCapacitiesGetOptionalParams,
|
StreamableMethod,
|
||||||
FabricCapacitiesCreateOrUpdateOptionalParams,
|
PathUncheckedResponse,
|
||||||
FabricCapacitiesUpdateOptionalParams,
|
createRestError,
|
||||||
FabricCapacitiesDeleteOptionalParams,
|
operationOptionsToRequestParameters,
|
||||||
FabricCapacitiesListByResourceGroupOptionalParams,
|
} from "@azure-rest/core-client";
|
||||||
FabricCapacitiesListBySubscriptionOptionalParams,
|
import { PollerLike, OperationState } from "@azure/core-lro";
|
||||||
FabricCapacitiesResumeOptionalParams,
|
|
||||||
FabricCapacitiesSuspendOptionalParams,
|
|
||||||
FabricCapacitiesCheckNameAvailabilityOptionalParams,
|
|
||||||
FabricCapacitiesListSkusForCapacityOptionalParams,
|
|
||||||
FabricCapacitiesListSkusOptionalParams,
|
|
||||||
} from "../../models/options.js";
|
|
||||||
|
|
||||||
export function _fabricCapacitiesGetSend(
|
export function _fabricCapacitiesGetSend(
|
||||||
context: Client,
|
context: Client,
|
||||||
|
@ -68,37 +72,7 @@ export async function _fabricCapacitiesGetDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return fabricCapacityDeserializer(result.body);
|
||||||
tags: result.body["tags"],
|
|
||||||
location: result.body["location"],
|
|
||||||
id: result.body["id"],
|
|
||||||
name: result.body["name"],
|
|
||||||
type: result.body["type"],
|
|
||||||
systemData: !result.body.systemData
|
|
||||||
? undefined
|
|
||||||
: {
|
|
||||||
createdBy: result.body.systemData?.["createdBy"],
|
|
||||||
createdByType: result.body.systemData?.["createdByType"],
|
|
||||||
createdAt:
|
|
||||||
result.body.systemData?.["createdAt"] !== undefined
|
|
||||||
? new Date(result.body.systemData?.["createdAt"])
|
|
||||||
: undefined,
|
|
||||||
lastModifiedBy: result.body.systemData?.["lastModifiedBy"],
|
|
||||||
lastModifiedByType: result.body.systemData?.["lastModifiedByType"],
|
|
||||||
lastModifiedAt:
|
|
||||||
result.body.systemData?.["lastModifiedAt"] !== undefined
|
|
||||||
? new Date(result.body.systemData?.["lastModifiedAt"])
|
|
||||||
: undefined,
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
provisioningState: result.body.properties["provisioningState"],
|
|
||||||
state: result.body.properties["state"],
|
|
||||||
administration: {
|
|
||||||
members: result.body.properties.administration["members"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sku: { name: result.body.sku["name"], tier: result.body.sku["tier"] },
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get a FabricCapacity */
|
/** Get a FabricCapacity */
|
||||||
|
@ -138,12 +112,7 @@ export function _fabricCapacitiesCreateOrUpdateSend(
|
||||||
)
|
)
|
||||||
.put({
|
.put({
|
||||||
...operationOptionsToRequestParameters(options),
|
...operationOptionsToRequestParameters(options),
|
||||||
body: {
|
body: fabricCapacitySerializer(resource),
|
||||||
tags: !resource.tags ? resource.tags : (serializeRecord(resource.tags as any) as any),
|
|
||||||
location: resource["location"],
|
|
||||||
properties: fabricCapacityPropertiesSerializer(resource.properties),
|
|
||||||
sku: rpSkuSerializer(resource.sku),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,37 +124,7 @@ export async function _fabricCapacitiesCreateOrUpdateDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return fabricCapacityDeserializer(result.body);
|
||||||
tags: result.body["tags"],
|
|
||||||
location: result.body["location"],
|
|
||||||
id: result.body["id"],
|
|
||||||
name: result.body["name"],
|
|
||||||
type: result.body["type"],
|
|
||||||
systemData: !result.body.systemData
|
|
||||||
? undefined
|
|
||||||
: {
|
|
||||||
createdBy: result.body.systemData?.["createdBy"],
|
|
||||||
createdByType: result.body.systemData?.["createdByType"],
|
|
||||||
createdAt:
|
|
||||||
result.body.systemData?.["createdAt"] !== undefined
|
|
||||||
? new Date(result.body.systemData?.["createdAt"])
|
|
||||||
: undefined,
|
|
||||||
lastModifiedBy: result.body.systemData?.["lastModifiedBy"],
|
|
||||||
lastModifiedByType: result.body.systemData?.["lastModifiedByType"],
|
|
||||||
lastModifiedAt:
|
|
||||||
result.body.systemData?.["lastModifiedAt"] !== undefined
|
|
||||||
? new Date(result.body.systemData?.["lastModifiedAt"])
|
|
||||||
: undefined,
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
provisioningState: result.body.properties["provisioningState"],
|
|
||||||
state: result.body.properties["state"],
|
|
||||||
administration: {
|
|
||||||
members: result.body.properties.administration["members"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sku: { name: result.body.sku["name"], tier: result.body.sku["tier"] },
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a FabricCapacity */
|
/** Create a FabricCapacity */
|
||||||
|
@ -232,13 +171,7 @@ export function _fabricCapacitiesUpdateSend(
|
||||||
)
|
)
|
||||||
.patch({
|
.patch({
|
||||||
...operationOptionsToRequestParameters(options),
|
...operationOptionsToRequestParameters(options),
|
||||||
body: {
|
body: fabricCapacityUpdateSerializer(properties),
|
||||||
sku: !properties.sku ? properties.sku : rpSkuSerializer(properties.sku),
|
|
||||||
tags: !properties.tags ? properties.tags : (serializeRecord(properties.tags as any) as any),
|
|
||||||
properties: !properties.properties
|
|
||||||
? properties.properties
|
|
||||||
: fabricCapacityUpdatePropertiesSerializer(properties.properties),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,37 +183,7 @@ export async function _fabricCapacitiesUpdateDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return fabricCapacityDeserializer(result.body);
|
||||||
tags: result.body["tags"],
|
|
||||||
location: result.body["location"],
|
|
||||||
id: result.body["id"],
|
|
||||||
name: result.body["name"],
|
|
||||||
type: result.body["type"],
|
|
||||||
systemData: !result.body.systemData
|
|
||||||
? undefined
|
|
||||||
: {
|
|
||||||
createdBy: result.body.systemData?.["createdBy"],
|
|
||||||
createdByType: result.body.systemData?.["createdByType"],
|
|
||||||
createdAt:
|
|
||||||
result.body.systemData?.["createdAt"] !== undefined
|
|
||||||
? new Date(result.body.systemData?.["createdAt"])
|
|
||||||
: undefined,
|
|
||||||
lastModifiedBy: result.body.systemData?.["lastModifiedBy"],
|
|
||||||
lastModifiedByType: result.body.systemData?.["lastModifiedByType"],
|
|
||||||
lastModifiedAt:
|
|
||||||
result.body.systemData?.["lastModifiedAt"] !== undefined
|
|
||||||
? new Date(result.body.systemData?.["lastModifiedAt"])
|
|
||||||
: undefined,
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
provisioningState: result.body.properties["provisioningState"],
|
|
||||||
state: result.body.properties["state"],
|
|
||||||
administration: {
|
|
||||||
members: result.body.properties.administration["members"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sku: { name: result.body.sku["name"], tier: result.body.sku["tier"] },
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Update a FabricCapacity */
|
/** Update a FabricCapacity */
|
||||||
|
@ -384,40 +287,7 @@ export async function _fabricCapacitiesListByResourceGroupDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return _fabricCapacityListResultDeserializer(result.body);
|
||||||
value: result.body["value"].map((p: any) => {
|
|
||||||
return {
|
|
||||||
tags: p["tags"],
|
|
||||||
location: p["location"],
|
|
||||||
id: p["id"],
|
|
||||||
name: p["name"],
|
|
||||||
type: p["type"],
|
|
||||||
systemData: !p.systemData
|
|
||||||
? undefined
|
|
||||||
: {
|
|
||||||
createdBy: p.systemData?.["createdBy"],
|
|
||||||
createdByType: p.systemData?.["createdByType"],
|
|
||||||
createdAt:
|
|
||||||
p.systemData?.["createdAt"] !== undefined
|
|
||||||
? new Date(p.systemData?.["createdAt"])
|
|
||||||
: undefined,
|
|
||||||
lastModifiedBy: p.systemData?.["lastModifiedBy"],
|
|
||||||
lastModifiedByType: p.systemData?.["lastModifiedByType"],
|
|
||||||
lastModifiedAt:
|
|
||||||
p.systemData?.["lastModifiedAt"] !== undefined
|
|
||||||
? new Date(p.systemData?.["lastModifiedAt"])
|
|
||||||
: undefined,
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
provisioningState: p.properties["provisioningState"],
|
|
||||||
state: p.properties["state"],
|
|
||||||
administration: { members: p.properties.administration["members"] },
|
|
||||||
},
|
|
||||||
sku: { name: p.sku["name"], tier: p.sku["tier"] },
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
nextLink: result.body["nextLink"],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** List FabricCapacity resources by resource group */
|
/** List FabricCapacity resources by resource group */
|
||||||
|
@ -459,40 +329,7 @@ export async function _fabricCapacitiesListBySubscriptionDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return _fabricCapacityListResultDeserializer(result.body);
|
||||||
value: result.body["value"].map((p: any) => {
|
|
||||||
return {
|
|
||||||
tags: p["tags"],
|
|
||||||
location: p["location"],
|
|
||||||
id: p["id"],
|
|
||||||
name: p["name"],
|
|
||||||
type: p["type"],
|
|
||||||
systemData: !p.systemData
|
|
||||||
? undefined
|
|
||||||
: {
|
|
||||||
createdBy: p.systemData?.["createdBy"],
|
|
||||||
createdByType: p.systemData?.["createdByType"],
|
|
||||||
createdAt:
|
|
||||||
p.systemData?.["createdAt"] !== undefined
|
|
||||||
? new Date(p.systemData?.["createdAt"])
|
|
||||||
: undefined,
|
|
||||||
lastModifiedBy: p.systemData?.["lastModifiedBy"],
|
|
||||||
lastModifiedByType: p.systemData?.["lastModifiedByType"],
|
|
||||||
lastModifiedAt:
|
|
||||||
p.systemData?.["lastModifiedAt"] !== undefined
|
|
||||||
? new Date(p.systemData?.["lastModifiedAt"])
|
|
||||||
: undefined,
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
provisioningState: p.properties["provisioningState"],
|
|
||||||
state: p.properties["state"],
|
|
||||||
administration: { members: p.properties.administration["members"] },
|
|
||||||
},
|
|
||||||
sku: { name: p.sku["name"], tier: p.sku["tier"] },
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
nextLink: result.body["nextLink"],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** List FabricCapacity resources by subscription ID */
|
/** List FabricCapacity resources by subscription ID */
|
||||||
|
@ -631,7 +468,7 @@ export function _fabricCapacitiesCheckNameAvailabilitySend(
|
||||||
)
|
)
|
||||||
.post({
|
.post({
|
||||||
...operationOptionsToRequestParameters(options),
|
...operationOptionsToRequestParameters(options),
|
||||||
body: { name: body["name"], type: body["type"] },
|
body: checkNameAvailabilityRequestSerializer(body),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,11 +480,7 @@ export async function _fabricCapacitiesCheckNameAvailabilityDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return checkNameAvailabilityResponseDeserializer(result.body);
|
||||||
nameAvailable: result.body["nameAvailable"],
|
|
||||||
reason: result.body["reason"],
|
|
||||||
message: result.body["message"],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Implements local CheckNameAvailability operations */
|
/** Implements local CheckNameAvailability operations */
|
||||||
|
@ -697,15 +530,7 @@ export async function _fabricCapacitiesListSkusForCapacityDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return _rpSkuEnumerationForExistingResourceResultDeserializer(result.body);
|
||||||
value: result.body["value"].map((p: any) => {
|
|
||||||
return {
|
|
||||||
resourceType: p["resourceType"],
|
|
||||||
sku: { name: p.sku["name"], tier: p.sku["tier"] },
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
nextLink: result.body["nextLink"],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** List eligible SKUs for a Microsoft Fabric resource */
|
/** List eligible SKUs for a Microsoft Fabric resource */
|
||||||
|
@ -752,16 +577,7 @@ export async function _fabricCapacitiesListSkusDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return _rpSkuEnumerationForNewResourceResultDeserializer(result.body);
|
||||||
value: result.body["value"].map((p: any) => {
|
|
||||||
return {
|
|
||||||
resourceType: p["resourceType"],
|
|
||||||
name: p["name"],
|
|
||||||
locations: p["locations"],
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
nextLink: result.body["nextLink"],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** List eligible SKUs for Microsoft Fabric resource provider */
|
/** List eligible SKUs for Microsoft Fabric resource provider */
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { TokenCredential } from "@azure/core-auth";
|
|
||||||
import { ClientOptions, Client, getClient } from "@azure-rest/core-client";
|
|
||||||
import { logger } from "../logger.js";
|
import { logger } from "../logger.js";
|
||||||
|
import { Client, ClientOptions, getClient } from "@azure-rest/core-client";
|
||||||
|
import { TokenCredential } from "@azure/core-auth";
|
||||||
|
|
||||||
export interface FabricContext extends Client {}
|
export interface FabricContext extends Client {}
|
||||||
|
|
||||||
|
@ -20,7 +20,10 @@ export function createFabric(
|
||||||
const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;
|
const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;
|
||||||
|
|
||||||
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
||||||
const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : "azsdk-js-api";
|
const userAgentInfo = `azsdk-js-arm-fabric/1.0.0`;
|
||||||
|
const userAgentPrefix = prefixFromOptions
|
||||||
|
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
||||||
|
: `azsdk-js-api ${userAgentInfo}`;
|
||||||
const { apiVersion: _, ...updatedOptions } = {
|
const { apiVersion: _, ...updatedOptions } = {
|
||||||
...options,
|
...options,
|
||||||
userAgentOptions: { userAgentPrefix },
|
userAgentOptions: { userAgentPrefix },
|
||||||
|
|
|
@ -2,6 +2,20 @@
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
export { createFabric, FabricContext, FabricClientOptionalParams } from "./fabricContext.js";
|
export { createFabric, FabricContext, FabricClientOptionalParams } from "./fabricContext.js";
|
||||||
|
export {
|
||||||
|
FabricCapacitiesGetOptionalParams,
|
||||||
|
FabricCapacitiesCreateOrUpdateOptionalParams,
|
||||||
|
FabricCapacitiesUpdateOptionalParams,
|
||||||
|
FabricCapacitiesDeleteOptionalParams,
|
||||||
|
FabricCapacitiesListByResourceGroupOptionalParams,
|
||||||
|
FabricCapacitiesListBySubscriptionOptionalParams,
|
||||||
|
FabricCapacitiesResumeOptionalParams,
|
||||||
|
FabricCapacitiesSuspendOptionalParams,
|
||||||
|
FabricCapacitiesCheckNameAvailabilityOptionalParams,
|
||||||
|
FabricCapacitiesListSkusForCapacityOptionalParams,
|
||||||
|
FabricCapacitiesListSkusOptionalParams,
|
||||||
|
OperationsListOptionalParams,
|
||||||
|
} from "./options.js";
|
||||||
export {
|
export {
|
||||||
fabricCapacitiesGet,
|
fabricCapacitiesGet,
|
||||||
fabricCapacitiesCreateOrUpdate,
|
fabricCapacitiesCreateOrUpdate,
|
||||||
|
|
|
@ -1,19 +1,22 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { Operation, _OperationListResult } from "../../models/models.js";
|
import { FabricContext as Client, OperationsListOptionalParams } from "../index.js";
|
||||||
import { FabricContext as Client } from "../index.js";
|
|
||||||
import {
|
import {
|
||||||
StreamableMethod,
|
_OperationListResult,
|
||||||
operationOptionsToRequestParameters,
|
_operationListResultDeserializer,
|
||||||
PathUncheckedResponse,
|
Operation,
|
||||||
createRestError,
|
} from "../../models/models.js";
|
||||||
} from "@azure-rest/core-client";
|
|
||||||
import {
|
import {
|
||||||
PagedAsyncIterableIterator,
|
PagedAsyncIterableIterator,
|
||||||
buildPagedAsyncIterator,
|
buildPagedAsyncIterator,
|
||||||
} from "../../static-helpers/pagingHelpers.js";
|
} from "../../static-helpers/pagingHelpers.js";
|
||||||
import { OperationsListOptionalParams } from "../../models/options.js";
|
import {
|
||||||
|
StreamableMethod,
|
||||||
|
PathUncheckedResponse,
|
||||||
|
createRestError,
|
||||||
|
operationOptionsToRequestParameters,
|
||||||
|
} from "@azure-rest/core-client";
|
||||||
|
|
||||||
export function _operationsListSend(
|
export function _operationsListSend(
|
||||||
context: Client,
|
context: Client,
|
||||||
|
@ -32,25 +35,7 @@ export async function _operationsListDeserialize(
|
||||||
throw createRestError(result);
|
throw createRestError(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return _operationListResultDeserializer(result.body);
|
||||||
value: result.body["value"].map((p: any) => {
|
|
||||||
return {
|
|
||||||
name: p["name"],
|
|
||||||
isDataAction: p["isDataAction"],
|
|
||||||
display: !p.display
|
|
||||||
? undefined
|
|
||||||
: {
|
|
||||||
provider: p.display?.["provider"],
|
|
||||||
resource: p.display?.["resource"],
|
|
||||||
operation: p.display?.["operation"],
|
|
||||||
description: p.display?.["description"],
|
|
||||||
},
|
|
||||||
origin: p["origin"],
|
|
||||||
actionType: p["actionType"],
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
nextLink: result.body["nextLink"],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** List the operations for the provider */
|
/** List the operations for the provider */
|
||||||
|
|
|
@ -2,14 +2,6 @@
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricContext } from "../../api/fabricContext.js";
|
import { FabricContext } from "../../api/fabricContext.js";
|
||||||
import {
|
|
||||||
FabricCapacity,
|
|
||||||
FabricCapacityUpdate,
|
|
||||||
CheckNameAvailabilityRequest,
|
|
||||||
CheckNameAvailabilityResponse,
|
|
||||||
RpSkuDetailsForExistingResource,
|
|
||||||
RpSkuDetailsForNewResource,
|
|
||||||
} from "../../models/models.js";
|
|
||||||
import {
|
import {
|
||||||
fabricCapacitiesGet,
|
fabricCapacitiesGet,
|
||||||
fabricCapacitiesCreateOrUpdate,
|
fabricCapacitiesCreateOrUpdate,
|
||||||
|
@ -23,6 +15,14 @@ import {
|
||||||
fabricCapacitiesListSkusForCapacity,
|
fabricCapacitiesListSkusForCapacity,
|
||||||
fabricCapacitiesListSkus,
|
fabricCapacitiesListSkus,
|
||||||
} from "../../api/fabricCapacities/index.js";
|
} from "../../api/fabricCapacities/index.js";
|
||||||
|
import {
|
||||||
|
FabricCapacity,
|
||||||
|
FabricCapacityUpdate,
|
||||||
|
CheckNameAvailabilityRequest,
|
||||||
|
CheckNameAvailabilityResponse,
|
||||||
|
RpSkuDetailsForExistingResource,
|
||||||
|
RpSkuDetailsForNewResource,
|
||||||
|
} from "../../models/models.js";
|
||||||
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
||||||
import { PollerLike, OperationState } from "@azure/core-lro";
|
import { PollerLike, OperationState } from "@azure/core-lro";
|
||||||
import {
|
import {
|
||||||
|
@ -37,7 +37,7 @@ import {
|
||||||
FabricCapacitiesCheckNameAvailabilityOptionalParams,
|
FabricCapacitiesCheckNameAvailabilityOptionalParams,
|
||||||
FabricCapacitiesListSkusForCapacityOptionalParams,
|
FabricCapacitiesListSkusForCapacityOptionalParams,
|
||||||
FabricCapacitiesListSkusOptionalParams,
|
FabricCapacitiesListSkusOptionalParams,
|
||||||
} from "../../models/options.js";
|
} from "../../api/options.js";
|
||||||
|
|
||||||
/** Interface representing a FabricCapacities operations. */
|
/** Interface representing a FabricCapacities operations. */
|
||||||
export interface FabricCapacitiesOperations {
|
export interface FabricCapacitiesOperations {
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { FabricContext } from "../../api/fabricContext.js";
|
import { FabricContext } from "../../api/fabricContext.js";
|
||||||
import { Operation } from "../../models/models.js";
|
|
||||||
import { operationsList } from "../../api/operations/index.js";
|
import { operationsList } from "../../api/operations/index.js";
|
||||||
|
import { OperationsListOptionalParams } from "../../api/options.js";
|
||||||
|
import { Operation } from "../../models/models.js";
|
||||||
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
||||||
import { OperationsListOptionalParams } from "../../models/options.js";
|
|
||||||
|
|
||||||
/** Interface representing a Operations operations. */
|
/** Interface representing a Operations operations. */
|
||||||
export interface OperationsOperations {
|
export interface OperationsOperations {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { TokenCredential } from "@azure/core-auth";
|
|
||||||
import { Pipeline } from "@azure/core-rest-pipeline";
|
|
||||||
import {
|
import {
|
||||||
getFabricCapacitiesOperations,
|
getFabricCapacitiesOperations,
|
||||||
FabricCapacitiesOperations,
|
FabricCapacitiesOperations,
|
||||||
} from "./classic/fabricCapacities/index.js";
|
} from "./classic/fabricCapacities/index.js";
|
||||||
import { getOperationsOperations, OperationsOperations } from "./classic/operations/index.js";
|
import { getOperationsOperations, OperationsOperations } from "./classic/operations/index.js";
|
||||||
import { createFabric, FabricContext, FabricClientOptionalParams } from "./api/index.js";
|
import { createFabric, FabricContext, FabricClientOptionalParams } from "./api/index.js";
|
||||||
|
import { Pipeline } from "@azure/core-rest-pipeline";
|
||||||
|
import { TokenCredential } from "@azure/core-auth";
|
||||||
|
|
||||||
export { FabricClientOptionalParams } from "./api/fabricContext.js";
|
export { FabricClientOptionalParams } from "./api/fabricContext.js";
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
PagedAsyncIterableIterator,
|
PagedAsyncIterableIterator,
|
||||||
} from "./static-helpers/pagingHelpers.js";
|
} from "./static-helpers/pagingHelpers.js";
|
||||||
|
|
||||||
export { FabricClient, FabricClientOptionalParams } from "./fabricClient.js";
|
export { FabricClient } from "./fabricClient.js";
|
||||||
export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js";
|
export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js";
|
||||||
export {
|
export {
|
||||||
Operation,
|
Operation,
|
||||||
|
@ -16,13 +16,9 @@ export {
|
||||||
Origin,
|
Origin,
|
||||||
KnownActionType,
|
KnownActionType,
|
||||||
ActionType,
|
ActionType,
|
||||||
Resource,
|
|
||||||
SystemData,
|
|
||||||
KnownCreatedByType,
|
|
||||||
CreatedByType,
|
|
||||||
TrackedResource,
|
|
||||||
FabricCapacity,
|
FabricCapacity,
|
||||||
FabricCapacityProperties,
|
FabricCapacityProperties,
|
||||||
|
ProvisioningState,
|
||||||
KnownProvisioningState,
|
KnownProvisioningState,
|
||||||
KnownResourceState,
|
KnownResourceState,
|
||||||
ResourceState,
|
ResourceState,
|
||||||
|
@ -30,6 +26,11 @@ export {
|
||||||
RpSku,
|
RpSku,
|
||||||
KnownRpSkuTier,
|
KnownRpSkuTier,
|
||||||
RpSkuTier,
|
RpSkuTier,
|
||||||
|
TrackedResource,
|
||||||
|
Resource,
|
||||||
|
SystemData,
|
||||||
|
KnownCreatedByType,
|
||||||
|
CreatedByType,
|
||||||
FabricCapacityUpdate,
|
FabricCapacityUpdate,
|
||||||
FabricCapacityUpdateProperties,
|
FabricCapacityUpdateProperties,
|
||||||
CheckNameAvailabilityRequest,
|
CheckNameAvailabilityRequest,
|
||||||
|
@ -38,7 +39,9 @@ export {
|
||||||
CheckNameAvailabilityReason,
|
CheckNameAvailabilityReason,
|
||||||
RpSkuDetailsForExistingResource,
|
RpSkuDetailsForExistingResource,
|
||||||
RpSkuDetailsForNewResource,
|
RpSkuDetailsForNewResource,
|
||||||
ProvisioningState,
|
} from "./models/index.js";
|
||||||
|
export {
|
||||||
|
FabricClientOptionalParams,
|
||||||
FabricCapacitiesGetOptionalParams,
|
FabricCapacitiesGetOptionalParams,
|
||||||
FabricCapacitiesCreateOrUpdateOptionalParams,
|
FabricCapacitiesCreateOrUpdateOptionalParams,
|
||||||
FabricCapacitiesUpdateOptionalParams,
|
FabricCapacitiesUpdateOptionalParams,
|
||||||
|
@ -51,6 +54,6 @@ export {
|
||||||
FabricCapacitiesListSkusForCapacityOptionalParams,
|
FabricCapacitiesListSkusForCapacityOptionalParams,
|
||||||
FabricCapacitiesListSkusOptionalParams,
|
FabricCapacitiesListSkusOptionalParams,
|
||||||
OperationsListOptionalParams,
|
OperationsListOptionalParams,
|
||||||
} from "./models/index.js";
|
} from "./api/index.js";
|
||||||
export { FabricCapacitiesOperations, OperationsOperations } from "./classic/index.js";
|
export { FabricCapacitiesOperations, OperationsOperations } from "./classic/index.js";
|
||||||
export { PageSettings, ContinuablePage, PagedAsyncIterableIterator };
|
export { PageSettings, ContinuablePage, PagedAsyncIterableIterator };
|
||||||
|
|
|
@ -8,13 +8,9 @@ export {
|
||||||
Origin,
|
Origin,
|
||||||
KnownActionType,
|
KnownActionType,
|
||||||
ActionType,
|
ActionType,
|
||||||
Resource,
|
|
||||||
SystemData,
|
|
||||||
KnownCreatedByType,
|
|
||||||
CreatedByType,
|
|
||||||
TrackedResource,
|
|
||||||
FabricCapacity,
|
FabricCapacity,
|
||||||
FabricCapacityProperties,
|
FabricCapacityProperties,
|
||||||
|
ProvisioningState,
|
||||||
KnownProvisioningState,
|
KnownProvisioningState,
|
||||||
KnownResourceState,
|
KnownResourceState,
|
||||||
ResourceState,
|
ResourceState,
|
||||||
|
@ -22,6 +18,11 @@ export {
|
||||||
RpSku,
|
RpSku,
|
||||||
KnownRpSkuTier,
|
KnownRpSkuTier,
|
||||||
RpSkuTier,
|
RpSkuTier,
|
||||||
|
TrackedResource,
|
||||||
|
Resource,
|
||||||
|
SystemData,
|
||||||
|
KnownCreatedByType,
|
||||||
|
CreatedByType,
|
||||||
FabricCapacityUpdate,
|
FabricCapacityUpdate,
|
||||||
FabricCapacityUpdateProperties,
|
FabricCapacityUpdateProperties,
|
||||||
CheckNameAvailabilityRequest,
|
CheckNameAvailabilityRequest,
|
||||||
|
@ -30,19 +31,4 @@ export {
|
||||||
CheckNameAvailabilityReason,
|
CheckNameAvailabilityReason,
|
||||||
RpSkuDetailsForExistingResource,
|
RpSkuDetailsForExistingResource,
|
||||||
RpSkuDetailsForNewResource,
|
RpSkuDetailsForNewResource,
|
||||||
ProvisioningState,
|
|
||||||
} from "./models.js";
|
} from "./models.js";
|
||||||
export {
|
|
||||||
FabricCapacitiesGetOptionalParams,
|
|
||||||
FabricCapacitiesCreateOrUpdateOptionalParams,
|
|
||||||
FabricCapacitiesUpdateOptionalParams,
|
|
||||||
FabricCapacitiesDeleteOptionalParams,
|
|
||||||
FabricCapacitiesListByResourceGroupOptionalParams,
|
|
||||||
FabricCapacitiesListBySubscriptionOptionalParams,
|
|
||||||
FabricCapacitiesResumeOptionalParams,
|
|
||||||
FabricCapacitiesSuspendOptionalParams,
|
|
||||||
FabricCapacitiesCheckNameAvailabilityOptionalParams,
|
|
||||||
FabricCapacitiesListSkusForCapacityOptionalParams,
|
|
||||||
FabricCapacitiesListSkusOptionalParams,
|
|
||||||
OperationsListOptionalParams,
|
|
||||||
} from "./options.js";
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT License.
|
// Licensed under the MIT License.
|
||||||
|
|
||||||
import { serializeRecord } from "../helpers/serializerHelpers.js";
|
|
||||||
|
|
||||||
/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */
|
/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */
|
||||||
export interface _OperationListResult {
|
export interface _OperationListResult {
|
||||||
/** The Operation items on this page */
|
/** The Operation items on this page */
|
||||||
|
@ -11,6 +9,13 @@ export interface _OperationListResult {
|
||||||
nextLink?: string;
|
nextLink?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function _operationListResultDeserializer(item: any): _OperationListResult {
|
||||||
|
return {
|
||||||
|
value: operationArrayDeserializer(item["value"]),
|
||||||
|
nextLink: item["nextLink"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/** Details of a REST API operation, returned from the Resource Provider Operations API */
|
/** Details of a REST API operation, returned from the Resource Provider Operations API */
|
||||||
export interface Operation {
|
export interface Operation {
|
||||||
/** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */
|
/** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */
|
||||||
|
@ -25,6 +30,16 @@ export interface Operation {
|
||||||
actionType?: ActionType;
|
actionType?: ActionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function operationDeserializer(item: any): Operation {
|
||||||
|
return {
|
||||||
|
name: item["name"],
|
||||||
|
isDataAction: item["isDataAction"],
|
||||||
|
display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]),
|
||||||
|
origin: item["origin"],
|
||||||
|
actionType: item["actionType"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/** Localized display information for and operation. */
|
/** Localized display information for and operation. */
|
||||||
export interface OperationDisplay {
|
export interface OperationDisplay {
|
||||||
/** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */
|
/** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */
|
||||||
|
@ -37,13 +52,22 @@ export interface OperationDisplay {
|
||||||
readonly description?: string;
|
readonly description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Known values of {@link Origin} that the service accepts. */
|
export function operationDisplayDeserializer(item: any): OperationDisplay {
|
||||||
|
return {
|
||||||
|
provider: item["provider"],
|
||||||
|
resource: item["resource"],
|
||||||
|
operation: item["operation"],
|
||||||
|
description: item["description"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */
|
||||||
export enum KnownOrigin {
|
export enum KnownOrigin {
|
||||||
/** user */
|
/** Indicates the operation is initiated by a user. */
|
||||||
User = "user",
|
User = "user",
|
||||||
/** system */
|
/** Indicates the operation is initiated by a system. */
|
||||||
System = "system",
|
System = "system",
|
||||||
/** user,system */
|
/** Indicates the operation is initiated by a user or system. */
|
||||||
UserSystem = "user,system",
|
UserSystem = "user,system",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,15 +76,15 @@ export enum KnownOrigin {
|
||||||
* {@link KnownOrigin} can be used interchangeably with Origin,
|
* {@link KnownOrigin} can be used interchangeably with Origin,
|
||||||
* this enum contains the known values that the service supports.
|
* this enum contains the known values that the service supports.
|
||||||
* ### Known values supported by the service
|
* ### Known values supported by the service
|
||||||
* **user** \
|
* **user**: Indicates the operation is initiated by a user. \
|
||||||
* **system** \
|
* **system**: Indicates the operation is initiated by a system. \
|
||||||
* **user,system**
|
* **user,system**: Indicates the operation is initiated by a user or system.
|
||||||
*/
|
*/
|
||||||
export type Origin = string;
|
export type Origin = string;
|
||||||
|
|
||||||
/** Known values of {@link ActionType} that the service accepts. */
|
/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
|
||||||
export enum KnownActionType {
|
export enum KnownActionType {
|
||||||
/** Internal */
|
/** Actions are for internal-only APIs. */
|
||||||
Internal = "Internal",
|
Internal = "Internal",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,79 +93,14 @@ export enum KnownActionType {
|
||||||
* {@link KnownActionType} can be used interchangeably with ActionType,
|
* {@link KnownActionType} can be used interchangeably with ActionType,
|
||||||
* this enum contains the known values that the service supports.
|
* this enum contains the known values that the service supports.
|
||||||
* ### Known values supported by the service
|
* ### Known values supported by the service
|
||||||
* **Internal**
|
* **Internal**: Actions are for internal-only APIs.
|
||||||
*/
|
*/
|
||||||
export type ActionType = string;
|
export type ActionType = string;
|
||||||
|
|
||||||
/** Common fields that are returned in the response for all Azure Resource Manager resources */
|
export function operationArrayDeserializer(result: Array<Operation>): any[] {
|
||||||
export interface Resource {
|
return result.map((item) => {
|
||||||
/** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */
|
return operationDeserializer(item);
|
||||||
readonly id?: string;
|
});
|
||||||
/** The name of the resource */
|
|
||||||
readonly name?: string;
|
|
||||||
/** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */
|
|
||||||
readonly type?: string;
|
|
||||||
/** Azure Resource Manager metadata containing createdBy and modifiedBy information. */
|
|
||||||
readonly systemData?: SystemData;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function resourceSerializer(item: Resource) {
|
|
||||||
return item as any;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Metadata pertaining to creation and last modification of the resource. */
|
|
||||||
export interface SystemData {
|
|
||||||
/** The identity that created the resource. */
|
|
||||||
createdBy?: string;
|
|
||||||
/** The type of identity that created the resource. */
|
|
||||||
createdByType?: CreatedByType;
|
|
||||||
/** The timestamp of resource creation (UTC). */
|
|
||||||
createdAt?: Date;
|
|
||||||
/** The identity that last modified the resource. */
|
|
||||||
lastModifiedBy?: string;
|
|
||||||
/** The type of identity that last modified the resource. */
|
|
||||||
lastModifiedByType?: CreatedByType;
|
|
||||||
/** The timestamp of resource last modification (UTC) */
|
|
||||||
lastModifiedAt?: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
||||||
export enum KnownCreatedByType {
|
|
||||||
/** User */
|
|
||||||
User = "User",
|
|
||||||
/** Application */
|
|
||||||
Application = "Application",
|
|
||||||
/** ManagedIdentity */
|
|
||||||
ManagedIdentity = "ManagedIdentity",
|
|
||||||
/** Key */
|
|
||||||
Key = "Key",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The kind of entity that created the resource. \
|
|
||||||
* {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
|
|
||||||
* this enum contains the known values that the service supports.
|
|
||||||
* ### Known values supported by the service
|
|
||||||
* **User** \
|
|
||||||
* **Application** \
|
|
||||||
* **ManagedIdentity** \
|
|
||||||
* **Key**
|
|
||||||
*/
|
|
||||||
export type CreatedByType = string;
|
|
||||||
|
|
||||||
/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
|
|
||||||
export interface TrackedResource extends Resource {
|
|
||||||
/** Resource tags. */
|
|
||||||
tags?: Record<string, string>;
|
|
||||||
/** The geo-location where the resource lives */
|
|
||||||
location: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function trackedResourceSerializer(item: TrackedResource): Record<string, unknown> {
|
|
||||||
return {
|
|
||||||
tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any),
|
|
||||||
location: item["location"],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Fabric Capacity resource */
|
/** Fabric Capacity resource */
|
||||||
|
@ -152,12 +111,27 @@ export interface FabricCapacity extends TrackedResource {
|
||||||
sku: RpSku;
|
sku: RpSku;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fabricCapacitySerializer(item: FabricCapacity): Record<string, unknown> {
|
export function fabricCapacitySerializer(item: FabricCapacity): any {
|
||||||
return {
|
return {
|
||||||
tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any),
|
tags: item["tags"],
|
||||||
location: item["location"],
|
location: item["location"],
|
||||||
properties: fabricCapacityPropertiesSerializer(item.properties),
|
properties: fabricCapacityPropertiesSerializer(item["properties"]),
|
||||||
sku: rpSkuSerializer(item.sku),
|
sku: rpSkuSerializer(item["sku"]),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fabricCapacityDeserializer(item: any): FabricCapacity {
|
||||||
|
return {
|
||||||
|
tags: item["tags"],
|
||||||
|
location: item["location"],
|
||||||
|
id: item["id"],
|
||||||
|
name: item["name"],
|
||||||
|
type: item["type"],
|
||||||
|
systemData: !item["systemData"]
|
||||||
|
? item["systemData"]
|
||||||
|
: systemDataDeserializer(item["systemData"]),
|
||||||
|
properties: fabricCapacityPropertiesDeserializer(item["properties"]),
|
||||||
|
sku: rpSkuDeserializer(item["sku"]),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,230 +145,22 @@ export interface FabricCapacityProperties {
|
||||||
administration: CapacityAdministration;
|
administration: CapacityAdministration;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fabricCapacityPropertiesSerializer(
|
export function fabricCapacityPropertiesSerializer(item: FabricCapacityProperties): any {
|
||||||
item: FabricCapacityProperties,
|
|
||||||
): Record<string, unknown> {
|
|
||||||
return {
|
return {
|
||||||
administration: capacityAdministrationSerializer(item.administration),
|
administration: capacityAdministrationSerializer(item["administration"]),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Known values of {@link ResourceState} that the service accepts. */
|
export function fabricCapacityPropertiesDeserializer(item: any): FabricCapacityProperties {
|
||||||
export enum KnownResourceState {
|
|
||||||
/** Active */
|
|
||||||
Active = "Active",
|
|
||||||
/** Provisioning */
|
|
||||||
Provisioning = "Provisioning",
|
|
||||||
/** Failed */
|
|
||||||
Failed = "Failed",
|
|
||||||
/** Updating */
|
|
||||||
Updating = "Updating",
|
|
||||||
/** Deleting */
|
|
||||||
Deleting = "Deleting",
|
|
||||||
/** Suspending */
|
|
||||||
Suspending = "Suspending",
|
|
||||||
/** Suspended */
|
|
||||||
Suspended = "Suspended",
|
|
||||||
/** Pausing */
|
|
||||||
Pausing = "Pausing",
|
|
||||||
/** Paused */
|
|
||||||
Paused = "Paused",
|
|
||||||
/** Resuming */
|
|
||||||
Resuming = "Resuming",
|
|
||||||
/** Scaling */
|
|
||||||
Scaling = "Scaling",
|
|
||||||
/** Preparing */
|
|
||||||
Preparing = "Preparing",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The state of the Fabric capacity resource. \
|
|
||||||
* {@link KnownResourceState} can be used interchangeably with ResourceState,
|
|
||||||
* this enum contains the known values that the service supports.
|
|
||||||
* ### Known values supported by the service
|
|
||||||
* **Active** \
|
|
||||||
* **Provisioning** \
|
|
||||||
* **Failed** \
|
|
||||||
* **Updating** \
|
|
||||||
* **Deleting** \
|
|
||||||
* **Suspending** \
|
|
||||||
* **Suspended** \
|
|
||||||
* **Pausing** \
|
|
||||||
* **Paused** \
|
|
||||||
* **Resuming** \
|
|
||||||
* **Scaling** \
|
|
||||||
* **Preparing**
|
|
||||||
*/
|
|
||||||
export type ResourceState = string;
|
|
||||||
|
|
||||||
/** The administration properties of the Fabric capacity resource */
|
|
||||||
export interface CapacityAdministration {
|
|
||||||
/** An array of administrator user identities. */
|
|
||||||
members: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export function capacityAdministrationSerializer(
|
|
||||||
item: CapacityAdministration,
|
|
||||||
): Record<string, unknown> {
|
|
||||||
return {
|
return {
|
||||||
members: item["members"],
|
provisioningState: !item["provisioningState"]
|
||||||
|
? item["provisioningState"]
|
||||||
|
: provisioningStateDeserializer(item["provisioningState"]),
|
||||||
|
state: item["state"],
|
||||||
|
administration: capacityAdministrationDeserializer(item["administration"]),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Represents the SKU name and Azure pricing tier for Microsoft Fabric capacity resource. */
|
|
||||||
export interface RpSku {
|
|
||||||
/** The name of the SKU level. */
|
|
||||||
name: string;
|
|
||||||
/** The name of the Azure pricing tier to which the SKU applies. */
|
|
||||||
tier: RpSkuTier;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function rpSkuSerializer(item: RpSku): Record<string, unknown> {
|
|
||||||
return {
|
|
||||||
name: item["name"],
|
|
||||||
tier: item["tier"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Known values of {@link RpSkuTier} that the service accepts. */
|
|
||||||
export enum KnownRpSkuTier {
|
|
||||||
/** fabric */
|
|
||||||
fabric = "Fabric",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The name of the Azure pricing tier to which the SKU applies. \
|
|
||||||
* {@link KnownRpSkuTier} can be used interchangeably with RpSkuTier,
|
|
||||||
* this enum contains the known values that the service supports.
|
|
||||||
* ### Known values supported by the service
|
|
||||||
* **Fabric**
|
|
||||||
*/
|
|
||||||
export type RpSkuTier = string;
|
|
||||||
|
|
||||||
/** The type used for update operations of the FabricCapacity. */
|
|
||||||
export interface FabricCapacityUpdate {
|
|
||||||
/** The SKU details */
|
|
||||||
sku?: RpSku;
|
|
||||||
/** Resource tags. */
|
|
||||||
tags?: Record<string, string>;
|
|
||||||
/** The resource-specific properties for this resource. */
|
|
||||||
properties?: FabricCapacityUpdateProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function fabricCapacityUpdateSerializer(
|
|
||||||
item: FabricCapacityUpdate,
|
|
||||||
): Record<string, unknown> {
|
|
||||||
return {
|
|
||||||
sku: !item.sku ? item.sku : rpSkuSerializer(item.sku),
|
|
||||||
tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any),
|
|
||||||
properties: !item.properties
|
|
||||||
? item.properties
|
|
||||||
: fabricCapacityUpdatePropertiesSerializer(item.properties),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The updatable properties of the FabricCapacity. */
|
|
||||||
export interface FabricCapacityUpdateProperties {
|
|
||||||
/** The capacity administration */
|
|
||||||
administration?: CapacityAdministration;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function fabricCapacityUpdatePropertiesSerializer(
|
|
||||||
item: FabricCapacityUpdateProperties,
|
|
||||||
): Record<string, unknown> {
|
|
||||||
return {
|
|
||||||
administration: !item.administration
|
|
||||||
? item.administration
|
|
||||||
: capacityAdministrationSerializer(item.administration),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The response of a FabricCapacity list operation. */
|
|
||||||
export interface _FabricCapacityListResult {
|
|
||||||
/** The FabricCapacity items on this page */
|
|
||||||
value: FabricCapacity[];
|
|
||||||
/** The link to the next page of items */
|
|
||||||
nextLink?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The check availability request body. */
|
|
||||||
export interface CheckNameAvailabilityRequest {
|
|
||||||
/** The name of the resource for which availability needs to be checked. */
|
|
||||||
name?: string;
|
|
||||||
/** The resource type. */
|
|
||||||
type?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function checkNameAvailabilityRequestSerializer(
|
|
||||||
item: CheckNameAvailabilityRequest,
|
|
||||||
): Record<string, unknown> {
|
|
||||||
return {
|
|
||||||
name: item["name"],
|
|
||||||
type: item["type"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The check availability result. */
|
|
||||||
export interface CheckNameAvailabilityResponse {
|
|
||||||
/** Indicates if the resource name is available. */
|
|
||||||
nameAvailable?: boolean;
|
|
||||||
/** The reason why the given name is not available. */
|
|
||||||
reason?: CheckNameAvailabilityReason;
|
|
||||||
/** Detailed reason why the given name is not available. */
|
|
||||||
message?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */
|
|
||||||
export enum KnownCheckNameAvailabilityReason {
|
|
||||||
/** Invalid */
|
|
||||||
Invalid = "Invalid",
|
|
||||||
/** AlreadyExists */
|
|
||||||
AlreadyExists = "AlreadyExists",
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Possible reasons for a name not being available. \
|
|
||||||
* {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason,
|
|
||||||
* this enum contains the known values that the service supports.
|
|
||||||
* ### Known values supported by the service
|
|
||||||
* **Invalid** \
|
|
||||||
* **AlreadyExists**
|
|
||||||
*/
|
|
||||||
export type CheckNameAvailabilityReason = string;
|
|
||||||
|
|
||||||
/** An object that represents enumerating SKUs for existing resources */
|
|
||||||
export interface _RpSkuEnumerationForExistingResourceResult {
|
|
||||||
/** The SKU details */
|
|
||||||
value: RpSkuDetailsForExistingResource[];
|
|
||||||
/** Url for the next page. Null if no more pages available */
|
|
||||||
nextLink?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** An object that represents SKU details for existing resources */
|
|
||||||
export interface RpSkuDetailsForExistingResource {
|
|
||||||
/** The resource type */
|
|
||||||
resourceType: string;
|
|
||||||
/** The SKU details */
|
|
||||||
sku: RpSku;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** An object that represents enumerating SKUs for new resources. */
|
|
||||||
export interface _RpSkuEnumerationForNewResourceResult {
|
|
||||||
/** The collection of available SKUs for new resources */
|
|
||||||
value: RpSkuDetailsForNewResource[];
|
|
||||||
/** Url for the next page. Null if no more pages available */
|
|
||||||
nextLink?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The SKU details */
|
|
||||||
export interface RpSkuDetailsForNewResource {
|
|
||||||
/** The resource type */
|
|
||||||
resourceType: string;
|
|
||||||
/** The SKU's name */
|
|
||||||
name: string;
|
|
||||||
/** The list of available locations for the SKU */
|
|
||||||
locations: string[];
|
|
||||||
}
|
|
||||||
/** Known values of {@link ProvisioningState} that the service accepts. */
|
/** Known values of {@link ProvisioningState} that the service accepts. */
|
||||||
export enum KnownProvisioningState {
|
export enum KnownProvisioningState {
|
||||||
/** Succeeded */
|
/** Succeeded */
|
||||||
|
@ -425,3 +191,419 @@ export enum KnownProvisioningState {
|
||||||
*/
|
*/
|
||||||
/** Alias for ProvisioningState */
|
/** Alias for ProvisioningState */
|
||||||
export type ProvisioningState = string;
|
export type ProvisioningState = string;
|
||||||
|
export function provisioningStateSerializer(item: ProvisioningState): any {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function provisioningStateDeserializer(item: any): ProvisioningState {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The state of the Fabric capacity resource. */
|
||||||
|
export enum KnownResourceState {
|
||||||
|
/** Resource is active */
|
||||||
|
Active = "Active",
|
||||||
|
/** Resource is provisioning */
|
||||||
|
Provisioning = "Provisioning",
|
||||||
|
/** Resource is failed */
|
||||||
|
Failed = "Failed",
|
||||||
|
/** Resource is updating */
|
||||||
|
Updating = "Updating",
|
||||||
|
/** Resource is deleting */
|
||||||
|
Deleting = "Deleting",
|
||||||
|
/** Resource is suspending */
|
||||||
|
Suspending = "Suspending",
|
||||||
|
/** Resource is suspended */
|
||||||
|
Suspended = "Suspended",
|
||||||
|
/** Resource is pausing */
|
||||||
|
Pausing = "Pausing",
|
||||||
|
/** Resource is paused */
|
||||||
|
Paused = "Paused",
|
||||||
|
/** Resource is resuming */
|
||||||
|
Resuming = "Resuming",
|
||||||
|
/** Resource is scaling */
|
||||||
|
Scaling = "Scaling",
|
||||||
|
/** Resource is preparing */
|
||||||
|
Preparing = "Preparing",
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The state of the Fabric capacity resource. \
|
||||||
|
* {@link KnownResourceState} can be used interchangeably with ResourceState,
|
||||||
|
* this enum contains the known values that the service supports.
|
||||||
|
* ### Known values supported by the service
|
||||||
|
* **Active**: Resource is active \
|
||||||
|
* **Provisioning**: Resource is provisioning \
|
||||||
|
* **Failed**: Resource is failed \
|
||||||
|
* **Updating**: Resource is updating \
|
||||||
|
* **Deleting**: Resource is deleting \
|
||||||
|
* **Suspending**: Resource is suspending \
|
||||||
|
* **Suspended**: Resource is suspended \
|
||||||
|
* **Pausing**: Resource is pausing \
|
||||||
|
* **Paused**: Resource is paused \
|
||||||
|
* **Resuming**: Resource is resuming \
|
||||||
|
* **Scaling**: Resource is scaling \
|
||||||
|
* **Preparing**: Resource is preparing
|
||||||
|
*/
|
||||||
|
export type ResourceState = string;
|
||||||
|
|
||||||
|
/** The administration properties of the Fabric capacity resource */
|
||||||
|
export interface CapacityAdministration {
|
||||||
|
/** An array of administrator user identities. */
|
||||||
|
members: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function capacityAdministrationSerializer(item: CapacityAdministration): any {
|
||||||
|
return {
|
||||||
|
members: item["members"].map((p: any) => {
|
||||||
|
return p;
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function capacityAdministrationDeserializer(item: any): CapacityAdministration {
|
||||||
|
return {
|
||||||
|
members: item["members"].map((p: any) => {
|
||||||
|
return p;
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Represents the SKU name and Azure pricing tier for Microsoft Fabric capacity resource. */
|
||||||
|
export interface RpSku {
|
||||||
|
/** The name of the SKU level. */
|
||||||
|
name: string;
|
||||||
|
/** The name of the Azure pricing tier to which the SKU applies. */
|
||||||
|
tier: RpSkuTier;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function rpSkuSerializer(item: RpSku): any {
|
||||||
|
return { name: item["name"], tier: item["tier"] };
|
||||||
|
}
|
||||||
|
|
||||||
|
export function rpSkuDeserializer(item: any): RpSku {
|
||||||
|
return {
|
||||||
|
name: item["name"],
|
||||||
|
tier: item["tier"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The name of the Azure pricing tier to which the SKU applies. */
|
||||||
|
export enum KnownRpSkuTier {
|
||||||
|
/** Fabric tier */
|
||||||
|
Fabric = "Fabric",
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the Azure pricing tier to which the SKU applies. \
|
||||||
|
* {@link KnownRpSkuTier} can be used interchangeably with RpSkuTier,
|
||||||
|
* this enum contains the known values that the service supports.
|
||||||
|
* ### Known values supported by the service
|
||||||
|
* **Fabric**: Fabric tier
|
||||||
|
*/
|
||||||
|
export type RpSkuTier = string;
|
||||||
|
|
||||||
|
/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
|
||||||
|
export interface TrackedResource extends Resource {
|
||||||
|
/** Resource tags. */
|
||||||
|
tags?: Record<string, string>;
|
||||||
|
/** The geo-location where the resource lives */
|
||||||
|
location: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function trackedResourceSerializer(item: TrackedResource): any {
|
||||||
|
return { tags: item["tags"], location: item["location"] };
|
||||||
|
}
|
||||||
|
|
||||||
|
export function trackedResourceDeserializer(item: any): TrackedResource {
|
||||||
|
return {
|
||||||
|
id: item["id"],
|
||||||
|
name: item["name"],
|
||||||
|
type: item["type"],
|
||||||
|
systemData: !item["systemData"]
|
||||||
|
? item["systemData"]
|
||||||
|
: systemDataDeserializer(item["systemData"]),
|
||||||
|
tags: item["tags"],
|
||||||
|
location: item["location"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Common fields that are returned in the response for all Azure Resource Manager resources */
|
||||||
|
export interface Resource {
|
||||||
|
/** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */
|
||||||
|
readonly id?: string;
|
||||||
|
/** The name of the resource */
|
||||||
|
readonly name?: string;
|
||||||
|
/** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */
|
||||||
|
readonly type?: string;
|
||||||
|
/** Azure Resource Manager metadata containing createdBy and modifiedBy information. */
|
||||||
|
readonly systemData?: SystemData;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function resourceSerializer(item: Resource): any {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function resourceDeserializer(item: any): Resource {
|
||||||
|
return {
|
||||||
|
id: item["id"],
|
||||||
|
name: item["name"],
|
||||||
|
type: item["type"],
|
||||||
|
systemData: !item["systemData"]
|
||||||
|
? item["systemData"]
|
||||||
|
: systemDataDeserializer(item["systemData"]),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Metadata pertaining to creation and last modification of the resource. */
|
||||||
|
export interface SystemData {
|
||||||
|
/** The identity that created the resource. */
|
||||||
|
createdBy?: string;
|
||||||
|
/** The type of identity that created the resource. */
|
||||||
|
createdByType?: CreatedByType;
|
||||||
|
/** The timestamp of resource creation (UTC). */
|
||||||
|
createdAt?: Date;
|
||||||
|
/** The identity that last modified the resource. */
|
||||||
|
lastModifiedBy?: string;
|
||||||
|
/** The type of identity that last modified the resource. */
|
||||||
|
lastModifiedByType?: CreatedByType;
|
||||||
|
/** The timestamp of resource last modification (UTC) */
|
||||||
|
lastModifiedAt?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function systemDataDeserializer(item: any): SystemData {
|
||||||
|
return {
|
||||||
|
createdBy: item["createdBy"],
|
||||||
|
createdByType: item["createdByType"],
|
||||||
|
createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]),
|
||||||
|
lastModifiedBy: item["lastModifiedBy"],
|
||||||
|
lastModifiedByType: item["lastModifiedByType"],
|
||||||
|
lastModifiedAt: !item["lastModifiedAt"]
|
||||||
|
? item["lastModifiedAt"]
|
||||||
|
: new Date(item["lastModifiedAt"]),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The kind of entity that created the resource. */
|
||||||
|
export enum KnownCreatedByType {
|
||||||
|
/** The entity was created by a user. */
|
||||||
|
User = "User",
|
||||||
|
/** The entity was created by an application. */
|
||||||
|
Application = "Application",
|
||||||
|
/** The entity was created by a managed identity. */
|
||||||
|
ManagedIdentity = "ManagedIdentity",
|
||||||
|
/** The entity was created by a key. */
|
||||||
|
Key = "Key",
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The kind of entity that created the resource. \
|
||||||
|
* {@link KnowncreatedByType} can be used interchangeably with createdByType,
|
||||||
|
* this enum contains the known values that the service supports.
|
||||||
|
* ### Known values supported by the service
|
||||||
|
* **User**: The entity was created by a user. \
|
||||||
|
* **Application**: The entity was created by an application. \
|
||||||
|
* **ManagedIdentity**: The entity was created by a managed identity. \
|
||||||
|
* **Key**: The entity was created by a key.
|
||||||
|
*/
|
||||||
|
export type CreatedByType = string;
|
||||||
|
|
||||||
|
/** The type used for update operations of the FabricCapacity. */
|
||||||
|
export interface FabricCapacityUpdate {
|
||||||
|
/** The SKU details */
|
||||||
|
sku?: RpSku;
|
||||||
|
/** Resource tags. */
|
||||||
|
tags?: Record<string, string>;
|
||||||
|
/** The resource-specific properties for this resource. */
|
||||||
|
properties?: FabricCapacityUpdateProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fabricCapacityUpdateSerializer(item: FabricCapacityUpdate): any {
|
||||||
|
return {
|
||||||
|
sku: !item["sku"] ? item["sku"] : rpSkuSerializer(item["sku"]),
|
||||||
|
tags: item["tags"],
|
||||||
|
properties: !item["properties"]
|
||||||
|
? item["properties"]
|
||||||
|
: fabricCapacityUpdatePropertiesSerializer(item["properties"]),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The updatable properties of the FabricCapacity. */
|
||||||
|
export interface FabricCapacityUpdateProperties {
|
||||||
|
/** The capacity administration */
|
||||||
|
administration?: CapacityAdministration;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fabricCapacityUpdatePropertiesSerializer(
|
||||||
|
item: FabricCapacityUpdateProperties,
|
||||||
|
): any {
|
||||||
|
return {
|
||||||
|
administration: !item["administration"]
|
||||||
|
? item["administration"]
|
||||||
|
: capacityAdministrationSerializer(item["administration"]),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The response of a FabricCapacity list operation. */
|
||||||
|
export interface _FabricCapacityListResult {
|
||||||
|
/** The FabricCapacity items on this page */
|
||||||
|
value: FabricCapacity[];
|
||||||
|
/** The link to the next page of items */
|
||||||
|
nextLink?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function _fabricCapacityListResultDeserializer(item: any): _FabricCapacityListResult {
|
||||||
|
return {
|
||||||
|
value: fabricCapacityArrayDeserializer(item["value"]),
|
||||||
|
nextLink: item["nextLink"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fabricCapacityArraySerializer(result: Array<FabricCapacity>): any[] {
|
||||||
|
return result.map((item) => {
|
||||||
|
return fabricCapacitySerializer(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fabricCapacityArrayDeserializer(result: Array<FabricCapacity>): any[] {
|
||||||
|
return result.map((item) => {
|
||||||
|
return fabricCapacityDeserializer(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The check availability request body. */
|
||||||
|
export interface CheckNameAvailabilityRequest {
|
||||||
|
/** The name of the resource for which availability needs to be checked. */
|
||||||
|
name?: string;
|
||||||
|
/** The resource type. */
|
||||||
|
type?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function checkNameAvailabilityRequestSerializer(item: CheckNameAvailabilityRequest): any {
|
||||||
|
return { name: item["name"], type: item["type"] };
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The check availability result. */
|
||||||
|
export interface CheckNameAvailabilityResponse {
|
||||||
|
/** Indicates if the resource name is available. */
|
||||||
|
nameAvailable?: boolean;
|
||||||
|
/** The reason why the given name is not available. */
|
||||||
|
reason?: CheckNameAvailabilityReason;
|
||||||
|
/** Detailed reason why the given name is not available. */
|
||||||
|
message?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function checkNameAvailabilityResponseDeserializer(
|
||||||
|
item: any,
|
||||||
|
): CheckNameAvailabilityResponse {
|
||||||
|
return {
|
||||||
|
nameAvailable: item["nameAvailable"],
|
||||||
|
reason: item["reason"],
|
||||||
|
message: item["message"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Possible reasons for a name not being available. */
|
||||||
|
export enum KnownCheckNameAvailabilityReason {
|
||||||
|
/** Name is invalid. */
|
||||||
|
Invalid = "Invalid",
|
||||||
|
/** Name already exists. */
|
||||||
|
AlreadyExists = "AlreadyExists",
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Possible reasons for a name not being available. \
|
||||||
|
* {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason,
|
||||||
|
* this enum contains the known values that the service supports.
|
||||||
|
* ### Known values supported by the service
|
||||||
|
* **Invalid**: Name is invalid. \
|
||||||
|
* **AlreadyExists**: Name already exists.
|
||||||
|
*/
|
||||||
|
export type CheckNameAvailabilityReason = string;
|
||||||
|
|
||||||
|
/** An object that represents enumerating SKUs for existing resources */
|
||||||
|
export interface _RpSkuEnumerationForExistingResourceResult {
|
||||||
|
/** The SKU details */
|
||||||
|
value: RpSkuDetailsForExistingResource[];
|
||||||
|
/** Url for the next page. Null if no more pages available */
|
||||||
|
nextLink?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function _rpSkuEnumerationForExistingResourceResultDeserializer(
|
||||||
|
item: any,
|
||||||
|
): _RpSkuEnumerationForExistingResourceResult {
|
||||||
|
return {
|
||||||
|
value: rpSkuDetailsForExistingResourceArrayDeserializer(item["value"]),
|
||||||
|
nextLink: item["nextLink"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** An object that represents SKU details for existing resources */
|
||||||
|
export interface RpSkuDetailsForExistingResource {
|
||||||
|
/** The resource type */
|
||||||
|
resourceType: string;
|
||||||
|
/** The SKU details */
|
||||||
|
sku: RpSku;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function rpSkuDetailsForExistingResourceDeserializer(
|
||||||
|
item: any,
|
||||||
|
): RpSkuDetailsForExistingResource {
|
||||||
|
return {
|
||||||
|
resourceType: item["resourceType"],
|
||||||
|
sku: rpSkuDeserializer(item["sku"]),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function rpSkuDetailsForExistingResourceArrayDeserializer(
|
||||||
|
result: Array<RpSkuDetailsForExistingResource>,
|
||||||
|
): any[] {
|
||||||
|
return result.map((item) => {
|
||||||
|
return rpSkuDetailsForExistingResourceDeserializer(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** An object that represents enumerating SKUs for new resources. */
|
||||||
|
export interface _RpSkuEnumerationForNewResourceResult {
|
||||||
|
/** The collection of available SKUs for new resources */
|
||||||
|
value: RpSkuDetailsForNewResource[];
|
||||||
|
/** Url for the next page. Null if no more pages available */
|
||||||
|
nextLink?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function _rpSkuEnumerationForNewResourceResultDeserializer(
|
||||||
|
item: any,
|
||||||
|
): _RpSkuEnumerationForNewResourceResult {
|
||||||
|
return {
|
||||||
|
value: rpSkuDetailsForNewResourceArrayDeserializer(item["value"]),
|
||||||
|
nextLink: item["nextLink"],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The SKU details */
|
||||||
|
export interface RpSkuDetailsForNewResource {
|
||||||
|
/** The resource type */
|
||||||
|
resourceType: string;
|
||||||
|
/** The SKU's name */
|
||||||
|
name: string;
|
||||||
|
/** The list of available locations for the SKU */
|
||||||
|
locations: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function rpSkuDetailsForNewResourceDeserializer(item: any): RpSkuDetailsForNewResource {
|
||||||
|
return {
|
||||||
|
resourceType: item["resourceType"],
|
||||||
|
name: item["name"],
|
||||||
|
locations: item["locations"].map((p: any) => {
|
||||||
|
return p;
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function rpSkuDetailsForNewResourceArrayDeserializer(
|
||||||
|
result: Array<RpSkuDetailsForNewResource>,
|
||||||
|
): any[] {
|
||||||
|
return result.map((item) => {
|
||||||
|
return rpSkuDetailsForNewResourceDeserializer(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
directory: specification/fabric/Microsoft.Fabric.Management
|
directory: specification/fabric/Microsoft.Fabric.Management
|
||||||
commit: f37031b7a22e37357a7417d2b8cb443074dfb563
|
commit: e6fde2ac19d0202f0e72217a3e0f9edb63dba273
|
||||||
repo: ../azure-rest-api-specs
|
repo: Azure/azure-rest-api-specs
|
||||||
additionalDirectories:
|
additionalDirectories:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче