Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-attestation] Added all private endpoint APIs #2748

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/attestation/arm-attestation/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Microsoft
Copyright (c) 2021 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 4 additions & 5 deletions sdk/attestation/arm-attestation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-attestation

### How to use

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

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

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

##### Sample code

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
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { AttestationManagementClient, AttestationManagementModels, AttestationManagementMappers } from "@azure/arm-attestation";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { AttestationManagementClient } = require("@azure/arm-attestation");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/attestation/arm-attestation/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand Down Expand Up @@ -44,7 +43,7 @@ export class AttestationManagementClientContext extends msRestAzure.AzureService

super(credentials, options);

this.apiVersion = '2020-10-01';
this.apiVersion = '2018-09-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -19,6 +19,5 @@ export {
JSONWebKeySet,
ProxyResource,
Resource,
SystemData,
TrackedResource
} from "../models/mappers";
63 changes: 6 additions & 57 deletions sdk/attestation/arm-attestation/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -11,38 +11,6 @@ import * as msRest from "@azure/ms-rest-js";

export { BaseResource, CloudError };

/**
* 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. Possible values include: 'User',
* 'Application', 'ManagedIdentity', 'Key'
*/
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. Possible values include: 'User',
* 'Application', 'ManagedIdentity', 'Key'
*/
lastModifiedByType?: CreatedByType;
/**
* The type of identity that last modified the resource.
*/
lastModifiedAt?: Date;
}

/**
* Display object with properties of the operation.
*/
Expand Down Expand Up @@ -83,11 +51,6 @@ export interface OperationsDefinition {
* List of supported operations.
*/
export interface OperationList {
/**
* The system metadata relating to this resource
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly systemData?: SystemData;
/**
* List of supported operations.
*/
Expand Down Expand Up @@ -138,11 +101,6 @@ export interface TrackedResource extends Resource {
* Attestation service response message.
*/
export interface AttestationProvider extends TrackedResource {
/**
* The system metadata relating to this resource
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly systemData?: SystemData;
/**
* Trust model for the attestation service instance.
*/
Expand All @@ -161,11 +119,6 @@ export interface AttestationProvider extends TrackedResource {
* Attestation Providers List.
*/
export interface AttestationProviderListResult {
/**
* The system metadata relating to this resource
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly systemData?: SystemData;
/**
* Attestation Provider array.
*/
Expand Down Expand Up @@ -299,6 +252,10 @@ export interface JSONWebKeySet {
* Client supplied parameters used to create a new attestation service instance.
*/
export interface AttestationServiceCreationSpecificParams {
/**
* Name of attestation policy.
*/
attestationPolicy?: string;
/**
* JSON Web Key Set defining a set of X.509 Certificates that will represent the parent
* certificate for the signing certificate used for policy operations
Expand Down Expand Up @@ -351,14 +308,6 @@ export interface AttestationManagementClientOptions extends AzureServiceClientOp
baseUri?: string;
}

/**
* Defines values for CreatedByType.
* Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
* @readonly
* @enum {string}
*/
export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key';

/**
* Defines values for AttestationServiceStatus.
* Possible values include: 'Ready', 'NotReady', 'Error'
Expand Down
80 changes: 8 additions & 72 deletions sdk/attestation/arm-attestation/src/models/mappers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -12,52 +12,6 @@ import * as msRest from "@azure/ms-rest-js";
export const CloudError = CloudErrorMapper;
export const BaseResource = BaseResourceMapper;

export const SystemData: msRest.CompositeMapper = {
serializedName: "systemData",
type: {
name: "Composite",
className: "SystemData",
modelProperties: {
createdBy: {
serializedName: "createdBy",
type: {
name: "String"
}
},
createdByType: {
serializedName: "createdByType",
type: {
name: "String"
}
},
createdAt: {
serializedName: "createdAt",
type: {
name: "DateTime"
}
},
lastModifiedBy: {
serializedName: "lastModifiedBy",
type: {
name: "String"
}
},
lastModifiedByType: {
serializedName: "lastModifiedByType",
type: {
name: "String"
}
},
lastModifiedAt: {
serializedName: "lastModifiedAt",
type: {
name: "DateTime"
}
}
}
}
};

export const OperationsDisplayDefinition: msRest.CompositeMapper = {
serializedName: "OperationsDisplayDefinition",
type: {
Expand Down Expand Up @@ -121,14 +75,6 @@ export const OperationList: msRest.CompositeMapper = {
name: "Composite",
className: "OperationList",
modelProperties: {
systemData: {
readOnly: true,
serializedName: "systemData",
type: {
name: "Composite",
className: "SystemData"
}
},
value: {
serializedName: "value",
type: {
Expand Down Expand Up @@ -212,14 +158,6 @@ export const AttestationProvider: msRest.CompositeMapper = {
className: "AttestationProvider",
modelProperties: {
...TrackedResource.type.modelProperties,
systemData: {
readOnly: true,
serializedName: "systemData",
type: {
name: "Composite",
className: "SystemData"
}
},
trustModel: {
serializedName: "properties.trustModel",
type: {
Expand Down Expand Up @@ -248,14 +186,6 @@ export const AttestationProviderListResult: msRest.CompositeMapper = {
name: "Composite",
className: "AttestationProviderListResult",
modelProperties: {
systemData: {
readOnly: true,
serializedName: "systemData",
type: {
name: "Composite",
className: "SystemData"
}
},
value: {
serializedName: "value",
type: {
Expand Down Expand Up @@ -442,6 +372,12 @@ export const AttestationServiceCreationSpecificParams: msRest.CompositeMapper =
name: "Composite",
className: "AttestationServiceCreationSpecificParams",
modelProperties: {
attestationPolicy: {
serializedName: "attestationPolicy",
type: {
name: "String"
}
},
policySigningCertificates: {
serializedName: "policySigningCertificates",
type: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -10,6 +10,5 @@ export {
CloudError,
OperationList,
OperationsDefinition,
OperationsDisplayDefinition,
SystemData
OperationsDisplayDefinition
} from "../models/mappers";
7 changes: 4 additions & 3 deletions sdk/attestation/arm-attestation/src/models/parameters.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand All @@ -24,7 +23,9 @@ export const apiVersion: msRest.OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
required: true,
isConstant: true,
serializedName: "api-version",
defaultValue: '2018-09-01-preview',
type: {
name: "String"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand Down Expand Up @@ -59,7 +58,7 @@ export class AttestationProviders {
}

/**
* Creates a new Attestation Provider instance.
* Creates or updates the Attestation Provider.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param providerName Name of the attestation service instance.
* @param creationParams Client supplied parameters.
Expand Down
5 changes: 2 additions & 3 deletions sdk/attestation/arm-attestation/src/operations/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand Down