@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.
Files changed (73) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +108 -0
  4. package/dist/index.js +587 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/dataBoundariesGetScopeSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/dataBoundariesGetScopeSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/dataBoundariesGetScopeSample.js +37 -0
  11. package/dist-esm/samples-dev/dataBoundariesGetScopeSample.js.map +1 -0
  12. package/dist-esm/samples-dev/dataBoundariesGetTenantSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/dataBoundariesGetTenantSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/dataBoundariesGetTenantSample.js +36 -0
  15. package/dist-esm/samples-dev/dataBoundariesGetTenantSample.js.map +1 -0
  16. package/dist-esm/samples-dev/dataBoundariesPutSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/dataBoundariesPutSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/dataBoundariesPutSample.js +39 -0
  19. package/dist-esm/samples-dev/dataBoundariesPutSample.js.map +1 -0
  20. package/dist-esm/src/databoundariesManegementClient.d.ts +18 -0
  21. package/dist-esm/src/databoundariesManegementClient.d.ts.map +1 -0
  22. package/dist-esm/src/databoundariesManegementClient.js +94 -0
  23. package/dist-esm/src/databoundariesManegementClient.js.map +1 -0
  24. package/dist-esm/src/index.d.ts +4 -0
  25. package/dist-esm/src/index.d.ts.map +1 -0
  26. package/dist-esm/src/index.js +11 -0
  27. package/dist-esm/src/index.js.map +1 -0
  28. package/dist-esm/src/models/index.d.ts +213 -0
  29. package/dist-esm/src/models/index.d.ts.map +1 -0
  30. package/dist-esm/src/models/index.js +54 -0
  31. package/dist-esm/src/models/index.js.map +1 -0
  32. package/dist-esm/src/models/mappers.d.ts +10 -0
  33. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  34. package/dist-esm/src/models/mappers.js +222 -0
  35. package/dist-esm/src/models/mappers.js.map +1 -0
  36. package/dist-esm/src/models/parameters.d.ts +9 -0
  37. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  38. package/dist-esm/src/models/parameters.js +81 -0
  39. package/dist-esm/src/models/parameters.js.map +1 -0
  40. package/dist-esm/src/operations/dataBoundaries.d.ts +33 -0
  41. package/dist-esm/src/operations/dataBoundaries.d.ts.map +1 -0
  42. package/dist-esm/src/operations/dataBoundaries.js +102 -0
  43. package/dist-esm/src/operations/dataBoundaries.js.map +1 -0
  44. package/dist-esm/src/operations/index.d.ts +2 -0
  45. package/dist-esm/src/operations/index.d.ts.map +1 -0
  46. package/dist-esm/src/operations/index.js +9 -0
  47. package/dist-esm/src/operations/index.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/dataBoundaries.d.ts +25 -0
  49. package/dist-esm/src/operationsInterfaces/dataBoundaries.d.ts.map +1 -0
  50. package/dist-esm/src/operationsInterfaces/dataBoundaries.js +9 -0
  51. package/dist-esm/src/operationsInterfaces/dataBoundaries.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
  53. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/index.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  56. package/dist-esm/test/databoundaries_operations_test.spec.d.ts +4 -0
  57. package/dist-esm/test/databoundaries_operations_test.spec.d.ts.map +1 -0
  58. package/dist-esm/test/databoundaries_operations_test.spec.js +58 -0
  59. package/dist-esm/test/databoundaries_operations_test.spec.js.map +1 -0
  60. package/package.json +115 -0
  61. package/review/arm-databoundaries.api.md +154 -0
  62. package/src/databoundariesManegementClient.ts +133 -0
  63. package/src/index.ts +11 -0
  64. package/src/models/index.ts +243 -0
  65. package/src/models/mappers.ts +236 -0
  66. package/src/models/parameters.ts +93 -0
  67. package/src/operations/dataBoundaries.ts +141 -0
  68. package/src/operations/index.ts +9 -0
  69. package/src/operationsInterfaces/dataBoundaries.ts +53 -0
  70. package/src/operationsInterfaces/index.ts +9 -0
  71. package/tsconfig.json +33 -0
  72. package/types/arm-databoundaries.d.ts +276 -0
  73. package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,236 @@
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
+ export const DataBoundaryProperties: coreClient.CompositeMapper = {
12
+ type: {
13
+ name: "Composite",
14
+ className: "DataBoundaryProperties",
15
+ modelProperties: {
16
+ dataBoundary: {
17
+ serializedName: "dataBoundary",
18
+ type: {
19
+ name: "String",
20
+ },
21
+ },
22
+ provisioningState: {
23
+ serializedName: "provisioningState",
24
+ readOnly: true,
25
+ type: {
26
+ name: "String",
27
+ },
28
+ },
29
+ },
30
+ },
31
+ };
32
+
33
+ export const Resource: coreClient.CompositeMapper = {
34
+ type: {
35
+ name: "Composite",
36
+ className: "Resource",
37
+ modelProperties: {
38
+ id: {
39
+ serializedName: "id",
40
+ readOnly: true,
41
+ type: {
42
+ name: "String",
43
+ },
44
+ },
45
+ name: {
46
+ serializedName: "name",
47
+ readOnly: true,
48
+ type: {
49
+ name: "String",
50
+ },
51
+ },
52
+ type: {
53
+ serializedName: "type",
54
+ readOnly: true,
55
+ type: {
56
+ name: "String",
57
+ },
58
+ },
59
+ systemData: {
60
+ serializedName: "systemData",
61
+ type: {
62
+ name: "Composite",
63
+ className: "SystemData",
64
+ },
65
+ },
66
+ },
67
+ },
68
+ };
69
+
70
+ export const SystemData: coreClient.CompositeMapper = {
71
+ type: {
72
+ name: "Composite",
73
+ className: "SystemData",
74
+ modelProperties: {
75
+ createdBy: {
76
+ serializedName: "createdBy",
77
+ type: {
78
+ name: "String",
79
+ },
80
+ },
81
+ createdByType: {
82
+ serializedName: "createdByType",
83
+ type: {
84
+ name: "String",
85
+ },
86
+ },
87
+ createdAt: {
88
+ serializedName: "createdAt",
89
+ type: {
90
+ name: "DateTime",
91
+ },
92
+ },
93
+ lastModifiedBy: {
94
+ serializedName: "lastModifiedBy",
95
+ type: {
96
+ name: "String",
97
+ },
98
+ },
99
+ lastModifiedByType: {
100
+ serializedName: "lastModifiedByType",
101
+ type: {
102
+ name: "String",
103
+ },
104
+ },
105
+ lastModifiedAt: {
106
+ serializedName: "lastModifiedAt",
107
+ type: {
108
+ name: "DateTime",
109
+ },
110
+ },
111
+ },
112
+ },
113
+ };
114
+
115
+ export const ErrorResponse: coreClient.CompositeMapper = {
116
+ type: {
117
+ name: "Composite",
118
+ className: "ErrorResponse",
119
+ modelProperties: {
120
+ error: {
121
+ serializedName: "error",
122
+ type: {
123
+ name: "Composite",
124
+ className: "ErrorDetail",
125
+ },
126
+ },
127
+ },
128
+ },
129
+ };
130
+
131
+ export const ErrorDetail: coreClient.CompositeMapper = {
132
+ type: {
133
+ name: "Composite",
134
+ className: "ErrorDetail",
135
+ modelProperties: {
136
+ code: {
137
+ serializedName: "code",
138
+ readOnly: true,
139
+ type: {
140
+ name: "String",
141
+ },
142
+ },
143
+ message: {
144
+ serializedName: "message",
145
+ readOnly: true,
146
+ type: {
147
+ name: "String",
148
+ },
149
+ },
150
+ target: {
151
+ serializedName: "target",
152
+ readOnly: true,
153
+ type: {
154
+ name: "String",
155
+ },
156
+ },
157
+ details: {
158
+ serializedName: "details",
159
+ readOnly: true,
160
+ type: {
161
+ name: "Sequence",
162
+ element: {
163
+ type: {
164
+ name: "Composite",
165
+ className: "ErrorDetail",
166
+ },
167
+ },
168
+ },
169
+ },
170
+ additionalInfo: {
171
+ serializedName: "additionalInfo",
172
+ readOnly: true,
173
+ type: {
174
+ name: "Sequence",
175
+ element: {
176
+ type: {
177
+ name: "Composite",
178
+ className: "ErrorAdditionalInfo",
179
+ },
180
+ },
181
+ },
182
+ },
183
+ },
184
+ },
185
+ };
186
+
187
+ export const ErrorAdditionalInfo: coreClient.CompositeMapper = {
188
+ type: {
189
+ name: "Composite",
190
+ className: "ErrorAdditionalInfo",
191
+ modelProperties: {
192
+ type: {
193
+ serializedName: "type",
194
+ readOnly: true,
195
+ type: {
196
+ name: "String",
197
+ },
198
+ },
199
+ info: {
200
+ serializedName: "info",
201
+ readOnly: true,
202
+ type: {
203
+ name: "Dictionary",
204
+ value: { type: { name: "any" } },
205
+ },
206
+ },
207
+ },
208
+ },
209
+ };
210
+
211
+ export const ProxyResource: coreClient.CompositeMapper = {
212
+ type: {
213
+ name: "Composite",
214
+ className: "ProxyResource",
215
+ modelProperties: {
216
+ ...Resource.type.modelProperties,
217
+ },
218
+ },
219
+ };
220
+
221
+ export const DataBoundaryDefinition: coreClient.CompositeMapper = {
222
+ type: {
223
+ name: "Composite",
224
+ className: "DataBoundaryDefinition",
225
+ modelProperties: {
226
+ ...ProxyResource.type.modelProperties,
227
+ properties: {
228
+ serializedName: "properties",
229
+ type: {
230
+ name: "Composite",
231
+ className: "DataBoundaryProperties",
232
+ },
233
+ },
234
+ },
235
+ },
236
+ };
@@ -0,0 +1,93 @@
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 {
10
+ OperationParameter,
11
+ OperationURLParameter,
12
+ OperationQueryParameter,
13
+ } from "@azure/core-client";
14
+ import { DataBoundaryDefinition as DataBoundaryDefinitionMapper } from "../models/mappers";
15
+
16
+ export const contentType: OperationParameter = {
17
+ parameterPath: ["options", "contentType"],
18
+ mapper: {
19
+ defaultValue: "application/json",
20
+ isConstant: true,
21
+ serializedName: "Content-Type",
22
+ type: {
23
+ name: "String",
24
+ },
25
+ },
26
+ };
27
+
28
+ export const dataBoundaryDefinition: OperationParameter = {
29
+ parameterPath: "dataBoundaryDefinition",
30
+ mapper: DataBoundaryDefinitionMapper,
31
+ };
32
+
33
+ export const accept: OperationParameter = {
34
+ parameterPath: "accept",
35
+ mapper: {
36
+ defaultValue: "application/json",
37
+ isConstant: true,
38
+ serializedName: "Accept",
39
+ type: {
40
+ name: "String",
41
+ },
42
+ },
43
+ };
44
+
45
+ export const $host: OperationURLParameter = {
46
+ parameterPath: "$host",
47
+ mapper: {
48
+ serializedName: "$host",
49
+ required: true,
50
+ type: {
51
+ name: "String",
52
+ },
53
+ },
54
+ skipEncoding: true,
55
+ };
56
+
57
+ export const apiVersion: OperationQueryParameter = {
58
+ parameterPath: "apiVersion",
59
+ mapper: {
60
+ defaultValue: "2024-08-01",
61
+ isConstant: true,
62
+ serializedName: "api-version",
63
+ type: {
64
+ name: "String",
65
+ },
66
+ },
67
+ };
68
+
69
+ export const defaultParam: OperationURLParameter = {
70
+ parameterPath: "defaultParam",
71
+ mapper: {
72
+ serializedName: "default",
73
+ required: true,
74
+ type: {
75
+ name: "String",
76
+ },
77
+ },
78
+ };
79
+
80
+ export const scope: OperationURLParameter = {
81
+ parameterPath: "scope",
82
+ mapper: {
83
+ constraints: {
84
+ MinLength: 1,
85
+ },
86
+ serializedName: "scope",
87
+ required: true,
88
+ type: {
89
+ name: "String",
90
+ },
91
+ },
92
+ skipEncoding: true,
93
+ };
@@ -0,0 +1,141 @@
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 { DataBoundaries } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { DataboundariesManegementClient } from "../databoundariesManegementClient";
14
+ import {
15
+ DataBoundaryDefinition,
16
+ DefaultName,
17
+ DataBoundariesPutOptionalParams,
18
+ DataBoundariesPutResponse,
19
+ DataBoundariesGetTenantOptionalParams,
20
+ DataBoundariesGetTenantResponse,
21
+ DataBoundariesGetScopeOptionalParams,
22
+ DataBoundariesGetScopeResponse,
23
+ } from "../models";
24
+
25
+ /** Class containing DataBoundaries operations. */
26
+ export class DataBoundariesImpl implements DataBoundaries {
27
+ private readonly client: DataboundariesManegementClient;
28
+
29
+ /**
30
+ * Initialize a new instance of the class DataBoundaries class.
31
+ * @param client Reference to the service client
32
+ */
33
+ constructor(client: DataboundariesManegementClient) {
34
+ this.client = client;
35
+ }
36
+
37
+ /**
38
+ * Opt-in tenant to data boundary.
39
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
40
+ * @param dataBoundaryDefinition The data boundary to opt the tenant to.
41
+ * @param options The options parameters.
42
+ */
43
+ put(
44
+ defaultParam: DefaultName,
45
+ dataBoundaryDefinition: DataBoundaryDefinition,
46
+ options?: DataBoundariesPutOptionalParams,
47
+ ): Promise<DataBoundariesPutResponse> {
48
+ return this.client.sendOperationRequest(
49
+ { defaultParam, dataBoundaryDefinition, options },
50
+ putOperationSpec,
51
+ );
52
+ }
53
+
54
+ /**
55
+ * Get data boundary of tenant.
56
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
57
+ * @param options The options parameters.
58
+ */
59
+ getTenant(
60
+ defaultParam: DefaultName,
61
+ options?: DataBoundariesGetTenantOptionalParams,
62
+ ): Promise<DataBoundariesGetTenantResponse> {
63
+ return this.client.sendOperationRequest(
64
+ { defaultParam, options },
65
+ getTenantOperationSpec,
66
+ );
67
+ }
68
+
69
+ /**
70
+ * Get data boundary at specified scope
71
+ * @param scope The scope at which the operation is performed.
72
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
73
+ * @param options The options parameters.
74
+ */
75
+ getScope(
76
+ scope: string,
77
+ defaultParam: DefaultName,
78
+ options?: DataBoundariesGetScopeOptionalParams,
79
+ ): Promise<DataBoundariesGetScopeResponse> {
80
+ return this.client.sendOperationRequest(
81
+ { scope, defaultParam, options },
82
+ getScopeOperationSpec,
83
+ );
84
+ }
85
+ }
86
+ // Operation Specifications
87
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
88
+
89
+ const putOperationSpec: coreClient.OperationSpec = {
90
+ path: "/providers/Microsoft.Resources/dataBoundaries/{default}",
91
+ httpMethod: "PUT",
92
+ responses: {
93
+ 200: {
94
+ bodyMapper: Mappers.DataBoundaryDefinition,
95
+ },
96
+ 201: {
97
+ bodyMapper: Mappers.DataBoundaryDefinition,
98
+ },
99
+ default: {
100
+ bodyMapper: Mappers.ErrorResponse,
101
+ },
102
+ },
103
+ requestBody: Parameters.dataBoundaryDefinition,
104
+ queryParameters: [Parameters.apiVersion],
105
+ urlParameters: [Parameters.$host, Parameters.defaultParam],
106
+ headerParameters: [Parameters.contentType, Parameters.accept],
107
+ mediaType: "json",
108
+ serializer,
109
+ };
110
+ const getTenantOperationSpec: coreClient.OperationSpec = {
111
+ path: "/providers/Microsoft.Resources/dataBoundaries/{default}",
112
+ httpMethod: "GET",
113
+ responses: {
114
+ 200: {
115
+ bodyMapper: Mappers.DataBoundaryDefinition,
116
+ },
117
+ default: {
118
+ bodyMapper: Mappers.ErrorResponse,
119
+ },
120
+ },
121
+ queryParameters: [Parameters.apiVersion],
122
+ urlParameters: [Parameters.$host, Parameters.defaultParam],
123
+ headerParameters: [Parameters.accept],
124
+ serializer,
125
+ };
126
+ const getScopeOperationSpec: coreClient.OperationSpec = {
127
+ path: "/{scope}/providers/Microsoft.Resources/dataBoundaries/{default}",
128
+ httpMethod: "GET",
129
+ responses: {
130
+ 200: {
131
+ bodyMapper: Mappers.DataBoundaryDefinition,
132
+ },
133
+ default: {
134
+ bodyMapper: Mappers.ErrorResponse,
135
+ },
136
+ },
137
+ queryParameters: [Parameters.apiVersion],
138
+ urlParameters: [Parameters.$host, Parameters.defaultParam, Parameters.scope],
139
+ headerParameters: [Parameters.accept],
140
+ serializer,
141
+ };
@@ -0,0 +1,9 @@
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 "./dataBoundaries";
@@ -0,0 +1,53 @@
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 {
10
+ DataBoundaryDefinition,
11
+ DefaultName,
12
+ DataBoundariesPutOptionalParams,
13
+ DataBoundariesPutResponse,
14
+ DataBoundariesGetTenantOptionalParams,
15
+ DataBoundariesGetTenantResponse,
16
+ DataBoundariesGetScopeOptionalParams,
17
+ DataBoundariesGetScopeResponse,
18
+ } from "../models";
19
+
20
+ /** Interface representing a DataBoundaries. */
21
+ export interface DataBoundaries {
22
+ /**
23
+ * Opt-in tenant to data boundary.
24
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
25
+ * @param dataBoundaryDefinition The data boundary to opt the tenant to.
26
+ * @param options The options parameters.
27
+ */
28
+ put(
29
+ defaultParam: DefaultName,
30
+ dataBoundaryDefinition: DataBoundaryDefinition,
31
+ options?: DataBoundariesPutOptionalParams,
32
+ ): Promise<DataBoundariesPutResponse>;
33
+ /**
34
+ * Get data boundary of tenant.
35
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
36
+ * @param options The options parameters.
37
+ */
38
+ getTenant(
39
+ defaultParam: DefaultName,
40
+ options?: DataBoundariesGetTenantOptionalParams,
41
+ ): Promise<DataBoundariesGetTenantResponse>;
42
+ /**
43
+ * Get data boundary at specified scope
44
+ * @param scope The scope at which the operation is performed.
45
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
46
+ * @param options The options parameters.
47
+ */
48
+ getScope(
49
+ scope: string,
50
+ defaultParam: DefaultName,
51
+ options?: DataBoundariesGetScopeOptionalParams,
52
+ ): Promise<DataBoundariesGetScopeResponse>;
53
+ }
@@ -0,0 +1,9 @@
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 "./dataBoundaries";
package/tsconfig.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "es6",
4
+ "moduleResolution": "node",
5
+ "strict": true,
6
+ "target": "es6",
7
+ "sourceMap": true,
8
+ "declarationMap": true,
9
+ "esModuleInterop": true,
10
+ "allowSyntheticDefaultImports": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "lib": [
13
+ "es6",
14
+ "dom"
15
+ ],
16
+ "declaration": true,
17
+ "outDir": "./dist-esm",
18
+ "importHelpers": true,
19
+ "paths": {
20
+ "@azure/arm-databoundaries": [
21
+ "./src/index"
22
+ ]
23
+ }
24
+ },
25
+ "include": [
26
+ "./src/**/*.ts",
27
+ "./test/**/*.ts",
28
+ "samples-dev/**/*.ts"
29
+ ],
30
+ "exclude": [
31
+ "node_modules"
32
+ ]
33
+ }