Skip to content

[ReleasePR @azure/arm-resourcegraph] Update GraphQuery location property readOnly=false #9295

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

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/resourcegraph/arm-resourcegraph/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Microsoft
Copyright (c) 2020 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
13 changes: 7 additions & 6 deletions sdk/resourcegraph/arm-resourcegraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ npm install @azure/arm-resourcegraph

### How to use

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

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

- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
npm install @azure/ms-rest-nodeauth
npm install @azure/ms-rest-nodeauth@"^3.0.0"
```

##### Sample code
Expand All @@ -34,7 +35,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new ResourceGraphClient(creds, subscriptionId);
client.operations.list().then((result) => {
client.operations.listMethod().then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -43,7 +44,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and list operations as an example written in JavaScript.
#### browser - Authentication, client creation and listMethod operations as an example written in JavaScript.

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

Expand Down Expand Up @@ -77,7 +78,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
authManager.login();
}
const client = new Azure.ArmResourcegraph.ResourceGraphClient(res.creds, subscriptionId);
client.operations.list().then((result) => {
client.operations.listMethod().then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand All @@ -95,4 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fresourcegraph%2Farm-resourcegraph%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/resourcegraph/arm-resourcegraph/README.png)
14 changes: 7 additions & 7 deletions sdk/resourcegraph/arm-resourcegraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "ResourceGraphClient Library with typescript type definitions for node.js and browser.",
"version": "2.0.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
"tslib": "^1.10.0"
},
"keywords": [
"node",
Expand All @@ -20,11 +20,11 @@
"module": "./esm/resourceGraphClient.js",
"types": "./esm/resourceGraphClient.d.ts",
"devDependencies": {
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
"typescript": "^3.5.3",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/resourcegraph/arm-resourcegraph",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/resourcegraph/arm-resourcegraph/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = {
*/`
},
plugins: [
nodeResolve({ module: true }),
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
Expand Down
20 changes: 20 additions & 0 deletions sdk/resourcegraph/arm-resourcegraph/src/models/getMappers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
discriminators,
ErrorDetails,
ErrorModel,
ErrorResponse,
ResourceChangeData,
ResourceChangeDataAfterSnapshot,
ResourceChangeDataBeforeSnapshot,
ResourceChangeDetailsRequestParameters,
ResourcePropertyChange,
ResourceSnapshotData
} from "../models/mappers";
240 changes: 237 additions & 3 deletions sdk/resourcegraph/arm-resourcegraph/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ export interface QueryRequest {
/**
* Azure subscriptions against which to execute the query.
*/
subscriptions: string[];
subscriptions?: string[];
/**
* The management group identifier.
*/
managementGroupId?: string;
/**
* The resources query.
*/
Expand Down Expand Up @@ -239,6 +243,172 @@ export interface FacetError {
errors: ErrorDetails[];
}

/**
* An interval in time specifying the date and time for the inclusive start and exclusive end, i.e.
* `[start, end)`.
*/
export interface DateTimeInterval {
/**
* A datetime indicating the inclusive/closed start of the time interval, i.e. `[`**`start`**`,
* end)`. Specifying a `start` that occurs chronologically after `end` will result in an error.
*/
start: Date;
/**
* A datetime indicating the exclusive/open end of the time interval, i.e. `[start,
* `**`end`**`)`. Specifying an `end` that occurs chronologically before `start` will result in
* an error.
*/
end: Date;
}

/**
* Specifies the date and time interval for a changes request.
*/
export interface ResourceChangesRequestParametersInterval extends DateTimeInterval {
}

/**
* The parameters for a specific changes request.
*/
export interface ResourceChangesRequestParameters {
/**
* Specifies the resource for a changes request.
*/
resourceId: string;
/**
* Specifies the date and time interval for a changes request.
*/
interval: ResourceChangesRequestParametersInterval;
/**
* Acts as the continuation token for paged responses.
*/
skipToken?: string;
/**
* The maximum number of changes the client can accept in a paged response.
*/
top?: number;
/**
* The flag if set to true will fetch property changes
*/
fetchPropertyChanges?: boolean;
}

/**
* Data on a specific resource snapshot.
*/
export interface ResourceSnapshotData {
/**
* The time when the snapshot was created.
* The snapshot timestamp provides an approximation as to when a modification to a resource was
* detected. There can be a difference between the actual modification time and the detection
* time. This is due to differences in how operations that modify a resource are processed,
* versus how operation that record resource snapshots are processed.
*/
timestamp: Date;
/**
* The resource snapshot content (in resourceChangeDetails response only).
*/
content?: any;
}

/**
* The snapshot before the change.
*/
export interface ResourceChangeDataBeforeSnapshot extends ResourceSnapshotData {
}

/**
* The snapshot after the change.
*/
export interface ResourceChangeDataAfterSnapshot extends ResourceSnapshotData {
}

/**
* The resource property change
*/
export interface ResourcePropertyChange {
/**
* The property name
*/
propertyName: string;
/**
* The property value in before snapshot
*/
beforeValue?: string;
/**
* The property value in after snapshot
*/
afterValue?: string;
/**
* The change category. Possible values include: 'User', 'System'
*/
changeCategory: ChangeCategory;
/**
* The property change Type. Possible values include: 'Insert', 'Update', 'Remove'
*/
propertyChangeType: PropertyChangeType;
}

/**
* Data on a specific change, represented by a pair of before and after resource snapshots.
*/
export interface ResourceChangeData {
/**
* The change ID. Valid and unique within the specified resource only.
*/
changeId: string;
/**
* The snapshot before the change.
*/
beforeSnapshot: ResourceChangeDataBeforeSnapshot;
/**
* The snapshot after the change.
*/
afterSnapshot: ResourceChangeDataAfterSnapshot;
/**
* The change type for snapshot. PropertyChanges will be provided in case of Update change type.
* Possible values include: 'Create', 'Update', 'Delete'
*/
changeType?: ChangeType;
/**
* An array of resource property change
*/
propertyChanges?: ResourcePropertyChange[];
}

/**
* A list of changes associated with a resource over a specific time interval.
*/
export interface ResourceChangeList {
/**
* The pageable value returned by the operation, i.e. a list of changes to the resource.
*
* - The list is ordered from the most recent changes to the least recent changes.
* - This list will be empty if there were no changes during the requested interval.
* - The `Before` snapshot timestamp value of the oldest change can be outside of the specified
* time interval.
*/
changes?: ResourceChangeData[];
/**
* Skip token that encodes the skip information while executing the current request
*/
skipToken?: any;
}

/**
* The parameters for a specific change details request.
*/
export interface ResourceChangeDetailsRequestParameters {
/**
* Specifies the resource for a change details request.
*/
resourceId: string;
/**
* Specifies the change ID.
*/
changeId: string;
}

/**
* Error details.
* @summary Error info.
Expand Down Expand Up @@ -357,6 +527,30 @@ export type ResultTruncated = 'true' | 'false';
*/
export type ColumnDataType = 'string' | 'integer' | 'number' | 'boolean' | 'object';

/**
* Defines values for ChangeType.
* Possible values include: 'Create', 'Update', 'Delete'
* @readonly
* @enum {string}
*/
export type ChangeType = 'Create' | 'Update' | 'Delete';

/**
* Defines values for ChangeCategory.
* Possible values include: 'User', 'System'
* @readonly
* @enum {string}
*/
export type ChangeCategory = 'User' | 'System';

/**
* Defines values for PropertyChangeType.
* Possible values include: 'Insert', 'Update', 'Remove'
* @readonly
* @enum {string}
*/
export type PropertyChangeType = 'Insert' | 'Update' | 'Remove';

/**
* Contains response data for the resources operation.
*/
Expand All @@ -378,9 +572,49 @@ export type ResourcesResponse = QueryResponse & {
};

/**
* Contains response data for the list operation.
* Contains response data for the resourceChanges operation.
*/
export type ListResourceChangesResponse = ResourceChangeList & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: ResourceChangeList;
};
};

/**
* Contains response data for the resourceChangeDetails operation.
*/
export type GetResourceChangeDetailsResponse = ResourceChangeData & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: ResourceChangeData;
};
};

/**
* Contains response data for the listMethod operation.
*/
export type OperationsListResponse = OperationListResult & {
export type OperationsListMethodResponse = OperationListResult & {
/**
* The underlying HTTP response.
*/
Expand Down
Loading