Skip to content

Commit 8a5db06

Browse files
author
SDKAuto
committed
CodeGen from PR 11695 in Azure/azure-rest-api-specs
Merge 912f3b048f9a73be0d8260a9acd6d2b85729365f into 11e915c47baf981dc5613fd782fccef4bc942a42
1 parent c4120bd commit 8a5db06

File tree

12 files changed

+41
-163
lines changed

12 files changed

+41
-163
lines changed

sdk/attestation/arm-attestation/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install @azure/arm-attestation
1515

1616
### How to use
1717

18-
#### nodejs - Authentication, client creation and list operations as an example written in TypeScript.
18+
#### nodejs - client creation and list operations as an example written in TypeScript.
1919

2020
##### Install @azure/ms-rest-nodeauth
2121

@@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"
2626

2727
##### Sample code
2828

29+
While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
2930
```typescript
30-
import * as msRest from "@azure/ms-rest-js";
31-
import * as msRestAzure from "@azure/ms-rest-azure-js";
32-
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
33-
import { AttestationManagementClient, AttestationManagementModels, AttestationManagementMappers } from "@azure/arm-attestation";
31+
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
32+
const { AttestationManagementClient } = require("@azure/arm-attestation");
3433
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
3534

3635
msRestNodeAuth.interactiveLogin().then((creds) => {

sdk/attestation/arm-attestation/rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const config = {
2121
"@azure/ms-rest-azure-js": "msRestAzure"
2222
},
2323
banner: `/*
24-
* Copyright (c) Microsoft Corporation. All rights reserved.
25-
* Licensed under the MIT License. See License.txt in the project root for license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2626
*
2727
* Code generated by Microsoft (R) AutoRest Code Generator.
2828
* Changes may cause incorrect behavior and will be lost if the code is regenerated.

sdk/attestation/arm-attestation/src/attestationManagementClient.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is

sdk/attestation/arm-attestation/src/attestationManagementClientContext.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -44,7 +43,7 @@ export class AttestationManagementClientContext extends msRestAzure.AzureService
4443

4544
super(credentials, options);
4645

47-
this.apiVersion = '2020-10-01';
46+
this.apiVersion = '2018-09-01-preview';
4847
this.acceptLanguage = 'en-US';
4948
this.longRunningOperationRetryTimeout = 30;
5049
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

sdk/attestation/arm-attestation/src/models/attestationProvidersMappers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
@@ -19,6 +19,5 @@ export {
1919
JSONWebKeySet,
2020
ProxyResource,
2121
Resource,
22-
SystemData,
2322
TrackedResource
2423
} from "../models/mappers";

sdk/attestation/arm-attestation/src/models/index.ts

Lines changed: 6 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
@@ -11,38 +11,6 @@ import * as msRest from "@azure/ms-rest-js";
1111

1212
export { BaseResource, CloudError };
1313

14-
/**
15-
* Metadata pertaining to creation and last modification of the resource.
16-
*/
17-
export interface SystemData {
18-
/**
19-
* The identity that created the resource.
20-
*/
21-
createdBy?: string;
22-
/**
23-
* The type of identity that created the resource. Possible values include: 'User',
24-
* 'Application', 'ManagedIdentity', 'Key'
25-
*/
26-
createdByType?: CreatedByType;
27-
/**
28-
* The timestamp of resource creation (UTC).
29-
*/
30-
createdAt?: Date;
31-
/**
32-
* The identity that last modified the resource.
33-
*/
34-
lastModifiedBy?: string;
35-
/**
36-
* The type of identity that last modified the resource. Possible values include: 'User',
37-
* 'Application', 'ManagedIdentity', 'Key'
38-
*/
39-
lastModifiedByType?: CreatedByType;
40-
/**
41-
* The type of identity that last modified the resource.
42-
*/
43-
lastModifiedAt?: Date;
44-
}
45-
4614
/**
4715
* Display object with properties of the operation.
4816
*/
@@ -83,11 +51,6 @@ export interface OperationsDefinition {
8351
* List of supported operations.
8452
*/
8553
export interface OperationList {
86-
/**
87-
* The system metadata relating to this resource
88-
* **NOTE: This property will not be serialized. It can only be populated by the server.**
89-
*/
90-
readonly systemData?: SystemData;
9154
/**
9255
* List of supported operations.
9356
*/
@@ -138,11 +101,6 @@ export interface TrackedResource extends Resource {
138101
* Attestation service response message.
139102
*/
140103
export interface AttestationProvider extends TrackedResource {
141-
/**
142-
* The system metadata relating to this resource
143-
* **NOTE: This property will not be serialized. It can only be populated by the server.**
144-
*/
145-
readonly systemData?: SystemData;
146104
/**
147105
* Trust model for the attestation service instance.
148106
*/
@@ -161,11 +119,6 @@ export interface AttestationProvider extends TrackedResource {
161119
* Attestation Providers List.
162120
*/
163121
export interface AttestationProviderListResult {
164-
/**
165-
* The system metadata relating to this resource
166-
* **NOTE: This property will not be serialized. It can only be populated by the server.**
167-
*/
168-
readonly systemData?: SystemData;
169122
/**
170123
* Attestation Provider array.
171124
*/
@@ -299,6 +252,10 @@ export interface JSONWebKeySet {
299252
* Client supplied parameters used to create a new attestation service instance.
300253
*/
301254
export interface AttestationServiceCreationSpecificParams {
255+
/**
256+
* Name of attestation policy.
257+
*/
258+
attestationPolicy?: string;
302259
/**
303260
* JSON Web Key Set defining a set of X.509 Certificates that will represent the parent
304261
* certificate for the signing certificate used for policy operations
@@ -351,14 +308,6 @@ export interface AttestationManagementClientOptions extends AzureServiceClientOp
351308
baseUri?: string;
352309
}
353310

354-
/**
355-
* Defines values for CreatedByType.
356-
* Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
357-
* @readonly
358-
* @enum {string}
359-
*/
360-
export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key';
361-
362311
/**
363312
* Defines values for AttestationServiceStatus.
364313
* Possible values include: 'Ready', 'NotReady', 'Error'

sdk/attestation/arm-attestation/src/models/mappers.ts

Lines changed: 8 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
@@ -12,52 +12,6 @@ import * as msRest from "@azure/ms-rest-js";
1212
export const CloudError = CloudErrorMapper;
1313
export const BaseResource = BaseResourceMapper;
1414

15-
export const SystemData: msRest.CompositeMapper = {
16-
serializedName: "systemData",
17-
type: {
18-
name: "Composite",
19-
className: "SystemData",
20-
modelProperties: {
21-
createdBy: {
22-
serializedName: "createdBy",
23-
type: {
24-
name: "String"
25-
}
26-
},
27-
createdByType: {
28-
serializedName: "createdByType",
29-
type: {
30-
name: "String"
31-
}
32-
},
33-
createdAt: {
34-
serializedName: "createdAt",
35-
type: {
36-
name: "DateTime"
37-
}
38-
},
39-
lastModifiedBy: {
40-
serializedName: "lastModifiedBy",
41-
type: {
42-
name: "String"
43-
}
44-
},
45-
lastModifiedByType: {
46-
serializedName: "lastModifiedByType",
47-
type: {
48-
name: "String"
49-
}
50-
},
51-
lastModifiedAt: {
52-
serializedName: "lastModifiedAt",
53-
type: {
54-
name: "DateTime"
55-
}
56-
}
57-
}
58-
}
59-
};
60-
6115
export const OperationsDisplayDefinition: msRest.CompositeMapper = {
6216
serializedName: "OperationsDisplayDefinition",
6317
type: {
@@ -121,14 +75,6 @@ export const OperationList: msRest.CompositeMapper = {
12175
name: "Composite",
12276
className: "OperationList",
12377
modelProperties: {
124-
systemData: {
125-
readOnly: true,
126-
serializedName: "systemData",
127-
type: {
128-
name: "Composite",
129-
className: "SystemData"
130-
}
131-
},
13278
value: {
13379
serializedName: "value",
13480
type: {
@@ -212,14 +158,6 @@ export const AttestationProvider: msRest.CompositeMapper = {
212158
className: "AttestationProvider",
213159
modelProperties: {
214160
...TrackedResource.type.modelProperties,
215-
systemData: {
216-
readOnly: true,
217-
serializedName: "systemData",
218-
type: {
219-
name: "Composite",
220-
className: "SystemData"
221-
}
222-
},
223161
trustModel: {
224162
serializedName: "properties.trustModel",
225163
type: {
@@ -248,14 +186,6 @@ export const AttestationProviderListResult: msRest.CompositeMapper = {
248186
name: "Composite",
249187
className: "AttestationProviderListResult",
250188
modelProperties: {
251-
systemData: {
252-
readOnly: true,
253-
serializedName: "systemData",
254-
type: {
255-
name: "Composite",
256-
className: "SystemData"
257-
}
258-
},
259189
value: {
260190
serializedName: "value",
261191
type: {
@@ -442,6 +372,12 @@ export const AttestationServiceCreationSpecificParams: msRest.CompositeMapper =
442372
name: "Composite",
443373
className: "AttestationServiceCreationSpecificParams",
444374
modelProperties: {
375+
attestationPolicy: {
376+
serializedName: "attestationPolicy",
377+
type: {
378+
name: "String"
379+
}
380+
},
445381
policySigningCertificates: {
446382
serializedName: "policySigningCertificates",
447383
type: {
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
@@ -10,6 +10,5 @@ export {
1010
CloudError,
1111
OperationList,
1212
OperationsDefinition,
13-
OperationsDisplayDefinition,
14-
SystemData
13+
OperationsDisplayDefinition
1514
} from "../models/mappers";

sdk/attestation/arm-attestation/src/models/parameters.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -24,7 +23,9 @@ export const apiVersion: msRest.OperationQueryParameter = {
2423
parameterPath: "apiVersion",
2524
mapper: {
2625
required: true,
26+
isConstant: true,
2727
serializedName: "api-version",
28+
defaultValue: '2018-09-01-preview',
2829
type: {
2930
name: "String"
3031
}

sdk/attestation/arm-attestation/src/operations/attestationProviders.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -59,7 +58,7 @@ export class AttestationProviders {
5958
}
6059

6160
/**
62-
* Creates a new Attestation Provider instance.
61+
* Creates or updates the Attestation Provider.
6362
* @param resourceGroupName The name of the resource group. The name is case insensitive.
6463
* @param providerName Name of the attestation service instance.
6564
* @param creationParams Client supplied parameters.

0 commit comments

Comments
 (0)