Skip to content
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
314 changes: 13 additions & 301 deletions sdk/resourcegraph/arm-resourcegraph/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,16 @@ export interface QueryRequestOptions {
*/
skip?: number;
/**
* Defines in which format query result returned. Possible values include: 'table', 'objectArray'
* Defines in which format query result returned. Possible values include: 'table',
* 'objectArray'. Default value: 'objectArray'.
*/
resultFormat?: ResultFormat;
/**
* Only applicable for tenant and management group level queries to decide whether to allow
* partial scopes for result in case the number of subscriptions exceed allowed limits. Default
* value: false.
*/
allowPartialScopes?: boolean;
}

/**
Expand Down Expand Up @@ -83,9 +90,9 @@ export interface QueryRequest {
*/
subscriptions?: string[];
/**
* The management group identifier.
* Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ]
*/
managementGroupId?: string;
managementGroups?: string[];
/**
* The resources query.
*/
Expand Down Expand Up @@ -139,11 +146,11 @@ export interface QueryResponse {
resultTruncated: ResultTruncated;
/**
* When present, the value can be passed to a subsequent query call (together with the same query
* and subscriptions used in the current request) to retrieve the next page of data.
* and scopes used in the current request) to retrieve the next page of data.
*/
skipToken?: string;
/**
* Query output in tabular format.
* Query output in JObject array or Table format.
*/
data: any;
/**
Expand Down Expand Up @@ -201,7 +208,7 @@ export interface FacetResult {
*/
count: number;
/**
* A table containing the desired facets. Only present if the facet is valid.
* A JObject array or Table containing the desired facets. Only present if the facet is valid.
*/
data: any;
}
Expand Down Expand Up @@ -313,204 +320,6 @@ export interface Operation {
origin?: string;
}

/**
* 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 ID of the snapshot.
*/
snapshotId?: string;
/**
* 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 ID of the resource
*/
resourceId?: string;
/**
* 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;
}

/**
* An interface representing ResourcesHistoryRequestOptions.
*/
export interface ResourcesHistoryRequestOptions {
interval?: DateTimeInterval;
top?: number;
skip?: number;
skipToken?: string;
/**
* Possible values include: 'table', 'objectArray'
*/
resultFormat?: ResultFormat1;
}

/**
* An interface representing ResourcesHistoryRequest.
*/
export interface ResourcesHistoryRequest {
subscriptions?: string[];
query?: string;
options?: ResourcesHistoryRequestOptions;
managementGroupId?: string;
}

/**
* An interface representing ResourceGraphClientOptions.
*/
Expand Down Expand Up @@ -559,38 +368,6 @@ 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';

/**
* Defines values for ResultFormat1.
* Possible values include: 'table', 'objectArray'
* @readonly
* @enum {string}
*/
export type ResultFormat1 = 'table' | 'objectArray';

/**
* Contains response data for the resources operation.
*/
Expand All @@ -611,71 +388,6 @@ export type ResourcesResponse = QueryResponse & {
};
};

/**
* Contains response data for the resourceChanges operation.
*/
export type ResourceChangesResponse = 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 ResourceChangeDetailsResponse = 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 resourcesHistory operation.
*/
export type ResourcesHistoryResponse = {
/**
* The parsed response body.
*/
body: any;

/**
* 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: any;
};
};

/**
* Contains response data for the list operation.
*/
Expand Down
Loading