@azure/arm-databoundaries 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/index.js +587 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/dataBoundariesGetScopeSample.d.ts +2 -0
- package/dist-esm/samples-dev/dataBoundariesGetScopeSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/dataBoundariesGetScopeSample.js +37 -0
- package/dist-esm/samples-dev/dataBoundariesGetScopeSample.js.map +1 -0
- package/dist-esm/samples-dev/dataBoundariesGetTenantSample.d.ts +2 -0
- package/dist-esm/samples-dev/dataBoundariesGetTenantSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/dataBoundariesGetTenantSample.js +36 -0
- package/dist-esm/samples-dev/dataBoundariesGetTenantSample.js.map +1 -0
- package/dist-esm/samples-dev/dataBoundariesPutSample.d.ts +2 -0
- package/dist-esm/samples-dev/dataBoundariesPutSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/dataBoundariesPutSample.js +39 -0
- package/dist-esm/samples-dev/dataBoundariesPutSample.js.map +1 -0
- package/dist-esm/src/databoundariesManegementClient.d.ts +18 -0
- package/dist-esm/src/databoundariesManegementClient.d.ts.map +1 -0
- package/dist-esm/src/databoundariesManegementClient.js +94 -0
- package/dist-esm/src/databoundariesManegementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +4 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +11 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +213 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +54 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +10 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +222 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +9 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +81 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/dataBoundaries.d.ts +33 -0
- package/dist-esm/src/operations/dataBoundaries.d.ts.map +1 -0
- package/dist-esm/src/operations/dataBoundaries.js +102 -0
- package/dist-esm/src/operations/dataBoundaries.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +2 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +9 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataBoundaries.d.ts +25 -0
- package/dist-esm/src/operationsInterfaces/dataBoundaries.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataBoundaries.js +9 -0
- package/dist-esm/src/operationsInterfaces/dataBoundaries.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +9 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/test/databoundaries_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/databoundaries_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/databoundaries_operations_test.spec.js +58 -0
- package/dist-esm/test/databoundaries_operations_test.spec.js.map +1 -0
- package/package.json +115 -0
- package/review/arm-databoundaries.api.md +154 -0
- package/src/databoundariesManegementClient.ts +133 -0
- package/src/index.ts +11 -0
- package/src/models/index.ts +243 -0
- package/src/models/mappers.ts +236 -0
- package/src/models/parameters.ts +93 -0
- package/src/operations/dataBoundaries.ts +141 -0
- package/src/operations/index.ts +9 -0
- package/src/operationsInterfaces/dataBoundaries.ts +53 -0
- package/src/operationsInterfaces/index.ts +9 -0
- package/tsconfig.json +33 -0
- package/types/arm-databoundaries.d.ts +276 -0
- package/types/tsdoc-metadata.json +11 -0
package/package.json
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@azure/arm-databoundaries",
|
|
3
|
+
"sdk-type": "mgmt",
|
|
4
|
+
"author": "Microsoft Corporation",
|
|
5
|
+
"description": "A generated SDK for DataboundariesManegementClient.",
|
|
6
|
+
"version": "1.0.0-beta.1",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=18.0.0"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@azure/core-client": "^1.7.0",
|
|
12
|
+
"@azure/core-auth": "^1.6.0",
|
|
13
|
+
"@azure/core-rest-pipeline": "^1.14.0",
|
|
14
|
+
"tslib": "^2.2.0"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"node",
|
|
18
|
+
"azure",
|
|
19
|
+
"typescript",
|
|
20
|
+
"browser",
|
|
21
|
+
"isomorphic"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"module": "./dist-esm/src/index.js",
|
|
26
|
+
"types": "./types/arm-databoundaries.d.ts",
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@microsoft/api-extractor": "^7.31.1",
|
|
29
|
+
"mkdirp": "^3.0.1",
|
|
30
|
+
"typescript": "~5.5.3",
|
|
31
|
+
"uglify-js": "^3.4.9",
|
|
32
|
+
"rimraf": "^5.0.0",
|
|
33
|
+
"dotenv": "^16.0.0",
|
|
34
|
+
"@azure/dev-tool": "^1.0.0",
|
|
35
|
+
"@azure/identity": "^4.2.1",
|
|
36
|
+
"@azure-tools/test-recorder": "^3.0.0",
|
|
37
|
+
"@azure-tools/test-credential": "^1.1.0",
|
|
38
|
+
"mocha": "^10.0.0",
|
|
39
|
+
"@types/mocha": "^10.0.0",
|
|
40
|
+
"tsx": "^4.7.1",
|
|
41
|
+
"@types/chai": "^4.2.8",
|
|
42
|
+
"chai": "^4.2.0",
|
|
43
|
+
"cross-env": "^7.0.2",
|
|
44
|
+
"@types/node": "^18.0.0",
|
|
45
|
+
"ts-node": "^10.0.0"
|
|
46
|
+
},
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"dist/**/*.js",
|
|
56
|
+
"dist/**/*.js.map",
|
|
57
|
+
"dist/**/*.d.ts",
|
|
58
|
+
"dist/**/*.d.ts.map",
|
|
59
|
+
"dist-esm/**/*.js",
|
|
60
|
+
"dist-esm/**/*.js.map",
|
|
61
|
+
"dist-esm/**/*.d.ts",
|
|
62
|
+
"dist-esm/**/*.d.ts.map",
|
|
63
|
+
"src/**/*.ts",
|
|
64
|
+
"README.md",
|
|
65
|
+
"LICENSE",
|
|
66
|
+
"tsconfig.json",
|
|
67
|
+
"review/*",
|
|
68
|
+
"CHANGELOG.md",
|
|
69
|
+
"types/*"
|
|
70
|
+
],
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api",
|
|
73
|
+
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
|
|
74
|
+
"prepack": "npm run build",
|
|
75
|
+
"pack": "npm pack 2>&1",
|
|
76
|
+
"extract-api": "dev-tool run extract-api",
|
|
77
|
+
"lint": "echo skipped",
|
|
78
|
+
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
79
|
+
"build:node": "echo skipped",
|
|
80
|
+
"build:browser": "echo skipped",
|
|
81
|
+
"build:test": "echo skipped",
|
|
82
|
+
"build:samples": "echo skipped.",
|
|
83
|
+
"check-format": "echo skipped",
|
|
84
|
+
"execute:samples": "echo skipped",
|
|
85
|
+
"format": "echo skipped",
|
|
86
|
+
"test": "npm run integration-test",
|
|
87
|
+
"test:node": "echo skipped",
|
|
88
|
+
"test:browser": "echo skipped",
|
|
89
|
+
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
90
|
+
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
|
|
91
|
+
"unit-test:browser": "echo skipped",
|
|
92
|
+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
93
|
+
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
|
|
94
|
+
"integration-test:browser": "echo skipped"
|
|
95
|
+
},
|
|
96
|
+
"sideEffects": false,
|
|
97
|
+
"//metadata": {
|
|
98
|
+
"constantPaths": [
|
|
99
|
+
{
|
|
100
|
+
"path": "src/databoundariesManegementClient.ts",
|
|
101
|
+
"prefix": "packageDetails"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"autoPublish": true,
|
|
106
|
+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databoundaries/arm-databoundaries",
|
|
107
|
+
"//sampleConfiguration": {
|
|
108
|
+
"productName": "",
|
|
109
|
+
"productSlugs": [
|
|
110
|
+
"azure"
|
|
111
|
+
],
|
|
112
|
+
"disableDocsMs": true,
|
|
113
|
+
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-databoundaries?view=azure-node-preview"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
## API Report File for "@azure/arm-databoundaries"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import * as coreAuth from '@azure/core-auth';
|
|
8
|
+
import * as coreClient from '@azure/core-client';
|
|
9
|
+
|
|
10
|
+
// @public
|
|
11
|
+
export type CreatedByType = string;
|
|
12
|
+
|
|
13
|
+
// @public
|
|
14
|
+
export interface DataBoundaries {
|
|
15
|
+
getScope(scope: string, defaultParam: DefaultName, options?: DataBoundariesGetScopeOptionalParams): Promise<DataBoundariesGetScopeResponse>;
|
|
16
|
+
getTenant(defaultParam: DefaultName, options?: DataBoundariesGetTenantOptionalParams): Promise<DataBoundariesGetTenantResponse>;
|
|
17
|
+
put(defaultParam: DefaultName, dataBoundaryDefinition: DataBoundaryDefinition, options?: DataBoundariesPutOptionalParams): Promise<DataBoundariesPutResponse>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// @public
|
|
21
|
+
export interface DataBoundariesGetScopeOptionalParams extends coreClient.OperationOptions {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// @public
|
|
25
|
+
export type DataBoundariesGetScopeResponse = DataBoundaryDefinition;
|
|
26
|
+
|
|
27
|
+
// @public
|
|
28
|
+
export interface DataBoundariesGetTenantOptionalParams extends coreClient.OperationOptions {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// @public
|
|
32
|
+
export type DataBoundariesGetTenantResponse = DataBoundaryDefinition;
|
|
33
|
+
|
|
34
|
+
// @public (undocumented)
|
|
35
|
+
export class DataboundariesManegementClient extends coreClient.ServiceClient {
|
|
36
|
+
// (undocumented)
|
|
37
|
+
$host: string;
|
|
38
|
+
constructor(credentials: coreAuth.TokenCredential, options?: DataboundariesManegementClientOptionalParams);
|
|
39
|
+
// (undocumented)
|
|
40
|
+
apiVersion: string;
|
|
41
|
+
// (undocumented)
|
|
42
|
+
dataBoundaries: DataBoundaries;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// @public
|
|
46
|
+
export interface DataboundariesManegementClientOptionalParams extends coreClient.ServiceClientOptions {
|
|
47
|
+
$host?: string;
|
|
48
|
+
apiVersion?: string;
|
|
49
|
+
endpoint?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// @public
|
|
53
|
+
export interface DataBoundariesPutOptionalParams extends coreClient.OperationOptions {
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// @public
|
|
57
|
+
export type DataBoundariesPutResponse = DataBoundaryDefinition;
|
|
58
|
+
|
|
59
|
+
// @public
|
|
60
|
+
export type DataBoundary = string;
|
|
61
|
+
|
|
62
|
+
// @public
|
|
63
|
+
export interface DataBoundaryDefinition extends ProxyResource {
|
|
64
|
+
properties?: DataBoundaryProperties;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// @public
|
|
68
|
+
export interface DataBoundaryProperties {
|
|
69
|
+
dataBoundary?: DataBoundary;
|
|
70
|
+
readonly provisioningState?: ProvisioningState;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// @public
|
|
74
|
+
export type DefaultName = string;
|
|
75
|
+
|
|
76
|
+
// @public
|
|
77
|
+
export interface ErrorAdditionalInfo {
|
|
78
|
+
readonly info?: Record<string, unknown>;
|
|
79
|
+
readonly type?: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// @public
|
|
83
|
+
export interface ErrorDetail {
|
|
84
|
+
readonly additionalInfo?: ErrorAdditionalInfo[];
|
|
85
|
+
readonly code?: string;
|
|
86
|
+
readonly details?: ErrorDetail[];
|
|
87
|
+
readonly message?: string;
|
|
88
|
+
readonly target?: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// @public
|
|
92
|
+
export interface ErrorResponse {
|
|
93
|
+
error?: ErrorDetail;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// @public
|
|
97
|
+
export enum KnownCreatedByType {
|
|
98
|
+
Application = "Application",
|
|
99
|
+
Key = "Key",
|
|
100
|
+
ManagedIdentity = "ManagedIdentity",
|
|
101
|
+
User = "User"
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// @public
|
|
105
|
+
export enum KnownDataBoundary {
|
|
106
|
+
EU = "EU",
|
|
107
|
+
Global = "Global",
|
|
108
|
+
NotDefined = "NotDefined"
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// @public
|
|
112
|
+
export enum KnownDefaultName {
|
|
113
|
+
Default = "default"
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// @public
|
|
117
|
+
export enum KnownProvisioningState {
|
|
118
|
+
Accepted = "Accepted",
|
|
119
|
+
Canceled = "Canceled",
|
|
120
|
+
Creating = "Creating",
|
|
121
|
+
Failed = "Failed",
|
|
122
|
+
Running = "Running",
|
|
123
|
+
Succeeded = "Succeeded",
|
|
124
|
+
Updating = "Updating"
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// @public
|
|
128
|
+
export type ProvisioningState = string;
|
|
129
|
+
|
|
130
|
+
// @public
|
|
131
|
+
export interface ProxyResource extends Resource {
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// @public
|
|
135
|
+
export interface Resource {
|
|
136
|
+
readonly id?: string;
|
|
137
|
+
readonly name?: string;
|
|
138
|
+
readonly systemData?: SystemData;
|
|
139
|
+
readonly type?: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// @public
|
|
143
|
+
export interface SystemData {
|
|
144
|
+
createdAt?: Date;
|
|
145
|
+
createdBy?: string;
|
|
146
|
+
createdByType?: CreatedByType;
|
|
147
|
+
lastModifiedAt?: Date;
|
|
148
|
+
lastModifiedBy?: string;
|
|
149
|
+
lastModifiedByType?: CreatedByType;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// (No @packageDocumentation comment for this package)
|
|
153
|
+
|
|
154
|
+
```
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
11
|
+
import {
|
|
12
|
+
PipelineRequest,
|
|
13
|
+
PipelineResponse,
|
|
14
|
+
SendRequest,
|
|
15
|
+
} from "@azure/core-rest-pipeline";
|
|
16
|
+
import * as coreAuth from "@azure/core-auth";
|
|
17
|
+
import { DataBoundariesImpl } from "./operations";
|
|
18
|
+
import { DataBoundaries } from "./operationsInterfaces";
|
|
19
|
+
import { DataboundariesManegementClientOptionalParams } from "./models";
|
|
20
|
+
|
|
21
|
+
export class DataboundariesManegementClient extends coreClient.ServiceClient {
|
|
22
|
+
$host: string;
|
|
23
|
+
apiVersion: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Initializes a new instance of the DataboundariesManegementClient class.
|
|
27
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
28
|
+
* @param options The parameter options
|
|
29
|
+
*/
|
|
30
|
+
constructor(
|
|
31
|
+
credentials: coreAuth.TokenCredential,
|
|
32
|
+
options?: DataboundariesManegementClientOptionalParams,
|
|
33
|
+
) {
|
|
34
|
+
if (credentials === undefined) {
|
|
35
|
+
throw new Error("'credentials' cannot be null");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Initializing default values for options
|
|
39
|
+
if (!options) {
|
|
40
|
+
options = {};
|
|
41
|
+
}
|
|
42
|
+
const defaults: DataboundariesManegementClientOptionalParams = {
|
|
43
|
+
requestContentType: "application/json; charset=utf-8",
|
|
44
|
+
credential: credentials,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const packageDetails = `azsdk-js-arm-databoundaries/1.0.0-beta.1`;
|
|
48
|
+
const userAgentPrefix =
|
|
49
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
50
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
51
|
+
: `${packageDetails}`;
|
|
52
|
+
|
|
53
|
+
const optionsWithDefaults = {
|
|
54
|
+
...defaults,
|
|
55
|
+
...options,
|
|
56
|
+
userAgentOptions: {
|
|
57
|
+
userAgentPrefix,
|
|
58
|
+
},
|
|
59
|
+
endpoint:
|
|
60
|
+
options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
61
|
+
};
|
|
62
|
+
super(optionsWithDefaults);
|
|
63
|
+
|
|
64
|
+
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
|
65
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
66
|
+
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =
|
|
67
|
+
options.pipeline.getOrderedPolicies();
|
|
68
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
69
|
+
(pipelinePolicy) =>
|
|
70
|
+
pipelinePolicy.name ===
|
|
71
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
if (
|
|
75
|
+
!options ||
|
|
76
|
+
!options.pipeline ||
|
|
77
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
78
|
+
!bearerTokenAuthenticationPolicyFound
|
|
79
|
+
) {
|
|
80
|
+
this.pipeline.removePolicy({
|
|
81
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
82
|
+
});
|
|
83
|
+
this.pipeline.addPolicy(
|
|
84
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
85
|
+
credential: credentials,
|
|
86
|
+
scopes:
|
|
87
|
+
optionsWithDefaults.credentialScopes ??
|
|
88
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
89
|
+
challengeCallbacks: {
|
|
90
|
+
authorizeRequestOnChallenge:
|
|
91
|
+
coreClient.authorizeRequestOnClaimChallenge,
|
|
92
|
+
},
|
|
93
|
+
}),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Assigning values to Constant parameters
|
|
98
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
99
|
+
this.apiVersion = options.apiVersion || "2024-08-01";
|
|
100
|
+
this.dataBoundaries = new DataBoundariesImpl(this);
|
|
101
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
105
|
+
private addCustomApiVersionPolicy(apiVersion?: string) {
|
|
106
|
+
if (!apiVersion) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const apiVersionPolicy = {
|
|
110
|
+
name: "CustomApiVersionPolicy",
|
|
111
|
+
async sendRequest(
|
|
112
|
+
request: PipelineRequest,
|
|
113
|
+
next: SendRequest,
|
|
114
|
+
): Promise<PipelineResponse> {
|
|
115
|
+
const param = request.url.split("?");
|
|
116
|
+
if (param.length > 1) {
|
|
117
|
+
const newParams = param[1].split("&").map((item) => {
|
|
118
|
+
if (item.indexOf("api-version") > -1) {
|
|
119
|
+
return "api-version=" + apiVersion;
|
|
120
|
+
} else {
|
|
121
|
+
return item;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
125
|
+
}
|
|
126
|
+
return next(request);
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
dataBoundaries: DataBoundaries;
|
|
133
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export * from "./models";
|
|
10
|
+
export { DataboundariesManegementClient } from "./databoundariesManegementClient";
|
|
11
|
+
export * from "./operationsInterfaces";
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
|
|
11
|
+
/** Data boundary properties */
|
|
12
|
+
export interface DataBoundaryProperties {
|
|
13
|
+
/** The data boundary definition. */
|
|
14
|
+
dataBoundary?: DataBoundary;
|
|
15
|
+
/**
|
|
16
|
+
* Denotes the state of provisioning.
|
|
17
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
18
|
+
*/
|
|
19
|
+
readonly provisioningState?: ProvisioningState;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Common fields that are returned in the response for all Azure Resource Manager resources */
|
|
23
|
+
export interface Resource {
|
|
24
|
+
/**
|
|
25
|
+
* Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
26
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
27
|
+
*/
|
|
28
|
+
readonly id?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The name of the resource
|
|
31
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
32
|
+
*/
|
|
33
|
+
readonly name?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
|
|
36
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
37
|
+
*/
|
|
38
|
+
readonly type?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
|
|
41
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
42
|
+
*/
|
|
43
|
+
readonly systemData?: SystemData;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Metadata pertaining to creation and last modification of the resource. */
|
|
47
|
+
export interface SystemData {
|
|
48
|
+
/** The identity that created the resource. */
|
|
49
|
+
createdBy?: string;
|
|
50
|
+
/** The type of identity that created the resource. */
|
|
51
|
+
createdByType?: CreatedByType;
|
|
52
|
+
/** The timestamp of resource creation (UTC). */
|
|
53
|
+
createdAt?: Date;
|
|
54
|
+
/** The identity that last modified the resource. */
|
|
55
|
+
lastModifiedBy?: string;
|
|
56
|
+
/** The type of identity that last modified the resource. */
|
|
57
|
+
lastModifiedByType?: CreatedByType;
|
|
58
|
+
/** The timestamp of resource last modification (UTC) */
|
|
59
|
+
lastModifiedAt?: Date;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */
|
|
63
|
+
export interface ErrorResponse {
|
|
64
|
+
/** The error object. */
|
|
65
|
+
error?: ErrorDetail;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** The error detail. */
|
|
69
|
+
export interface ErrorDetail {
|
|
70
|
+
/**
|
|
71
|
+
* The error code.
|
|
72
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
73
|
+
*/
|
|
74
|
+
readonly code?: string;
|
|
75
|
+
/**
|
|
76
|
+
* The error message.
|
|
77
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
78
|
+
*/
|
|
79
|
+
readonly message?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The error target.
|
|
82
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
83
|
+
*/
|
|
84
|
+
readonly target?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The error details.
|
|
87
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
88
|
+
*/
|
|
89
|
+
readonly details?: ErrorDetail[];
|
|
90
|
+
/**
|
|
91
|
+
* The error additional info.
|
|
92
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
93
|
+
*/
|
|
94
|
+
readonly additionalInfo?: ErrorAdditionalInfo[];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** The resource management error additional info. */
|
|
98
|
+
export interface ErrorAdditionalInfo {
|
|
99
|
+
/**
|
|
100
|
+
* The additional info type.
|
|
101
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
102
|
+
*/
|
|
103
|
+
readonly type?: string;
|
|
104
|
+
/**
|
|
105
|
+
* The additional info.
|
|
106
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
107
|
+
*/
|
|
108
|
+
readonly info?: Record<string, unknown>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
|
|
112
|
+
export interface ProxyResource extends Resource {}
|
|
113
|
+
|
|
114
|
+
/** A data boundary definition. */
|
|
115
|
+
export interface DataBoundaryDefinition extends ProxyResource {
|
|
116
|
+
/** Data boundary properties */
|
|
117
|
+
properties?: DataBoundaryProperties;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** Known values of {@link DefaultName} that the service accepts. */
|
|
121
|
+
export enum KnownDefaultName {
|
|
122
|
+
/** Default */
|
|
123
|
+
Default = "default",
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Defines values for DefaultName. \
|
|
128
|
+
* {@link KnownDefaultName} can be used interchangeably with DefaultName,
|
|
129
|
+
* this enum contains the known values that the service supports.
|
|
130
|
+
* ### Known values supported by the service
|
|
131
|
+
* **default**
|
|
132
|
+
*/
|
|
133
|
+
export type DefaultName = string;
|
|
134
|
+
|
|
135
|
+
/** Known values of {@link DataBoundary} that the service accepts. */
|
|
136
|
+
export enum KnownDataBoundary {
|
|
137
|
+
/** NotDefined */
|
|
138
|
+
NotDefined = "NotDefined",
|
|
139
|
+
/** Global */
|
|
140
|
+
Global = "Global",
|
|
141
|
+
/** EU */
|
|
142
|
+
EU = "EU",
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Defines values for DataBoundary. \
|
|
147
|
+
* {@link KnownDataBoundary} can be used interchangeably with DataBoundary,
|
|
148
|
+
* this enum contains the known values that the service supports.
|
|
149
|
+
* ### Known values supported by the service
|
|
150
|
+
* **NotDefined** \
|
|
151
|
+
* **Global** \
|
|
152
|
+
* **EU**
|
|
153
|
+
*/
|
|
154
|
+
export type DataBoundary = string;
|
|
155
|
+
|
|
156
|
+
/** Known values of {@link ProvisioningState} that the service accepts. */
|
|
157
|
+
export enum KnownProvisioningState {
|
|
158
|
+
/** Accepted */
|
|
159
|
+
Accepted = "Accepted",
|
|
160
|
+
/** Running */
|
|
161
|
+
Running = "Running",
|
|
162
|
+
/** Creating */
|
|
163
|
+
Creating = "Creating",
|
|
164
|
+
/** Canceled */
|
|
165
|
+
Canceled = "Canceled",
|
|
166
|
+
/** Failed */
|
|
167
|
+
Failed = "Failed",
|
|
168
|
+
/** Succeeded */
|
|
169
|
+
Succeeded = "Succeeded",
|
|
170
|
+
/** Updating */
|
|
171
|
+
Updating = "Updating",
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Defines values for ProvisioningState. \
|
|
176
|
+
* {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,
|
|
177
|
+
* this enum contains the known values that the service supports.
|
|
178
|
+
* ### Known values supported by the service
|
|
179
|
+
* **Accepted** \
|
|
180
|
+
* **Running** \
|
|
181
|
+
* **Creating** \
|
|
182
|
+
* **Canceled** \
|
|
183
|
+
* **Failed** \
|
|
184
|
+
* **Succeeded** \
|
|
185
|
+
* **Updating**
|
|
186
|
+
*/
|
|
187
|
+
export type ProvisioningState = string;
|
|
188
|
+
|
|
189
|
+
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
190
|
+
export enum KnownCreatedByType {
|
|
191
|
+
/** User */
|
|
192
|
+
User = "User",
|
|
193
|
+
/** Application */
|
|
194
|
+
Application = "Application",
|
|
195
|
+
/** ManagedIdentity */
|
|
196
|
+
ManagedIdentity = "ManagedIdentity",
|
|
197
|
+
/** Key */
|
|
198
|
+
Key = "Key",
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Defines values for CreatedByType. \
|
|
203
|
+
* {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
|
|
204
|
+
* this enum contains the known values that the service supports.
|
|
205
|
+
* ### Known values supported by the service
|
|
206
|
+
* **User** \
|
|
207
|
+
* **Application** \
|
|
208
|
+
* **ManagedIdentity** \
|
|
209
|
+
* **Key**
|
|
210
|
+
*/
|
|
211
|
+
export type CreatedByType = string;
|
|
212
|
+
|
|
213
|
+
/** Optional parameters. */
|
|
214
|
+
export interface DataBoundariesPutOptionalParams
|
|
215
|
+
extends coreClient.OperationOptions {}
|
|
216
|
+
|
|
217
|
+
/** Contains response data for the put operation. */
|
|
218
|
+
export type DataBoundariesPutResponse = DataBoundaryDefinition;
|
|
219
|
+
|
|
220
|
+
/** Optional parameters. */
|
|
221
|
+
export interface DataBoundariesGetTenantOptionalParams
|
|
222
|
+
extends coreClient.OperationOptions {}
|
|
223
|
+
|
|
224
|
+
/** Contains response data for the getTenant operation. */
|
|
225
|
+
export type DataBoundariesGetTenantResponse = DataBoundaryDefinition;
|
|
226
|
+
|
|
227
|
+
/** Optional parameters. */
|
|
228
|
+
export interface DataBoundariesGetScopeOptionalParams
|
|
229
|
+
extends coreClient.OperationOptions {}
|
|
230
|
+
|
|
231
|
+
/** Contains response data for the getScope operation. */
|
|
232
|
+
export type DataBoundariesGetScopeResponse = DataBoundaryDefinition;
|
|
233
|
+
|
|
234
|
+
/** Optional parameters. */
|
|
235
|
+
export interface DataboundariesManegementClientOptionalParams
|
|
236
|
+
extends coreClient.ServiceClientOptions {
|
|
237
|
+
/** server parameter */
|
|
238
|
+
$host?: string;
|
|
239
|
+
/** Api Version */
|
|
240
|
+
apiVersion?: string;
|
|
241
|
+
/** Overrides client endpoint. */
|
|
242
|
+
endpoint?: string;
|
|
243
|
+
}
|