Skip to content

Commit

Permalink
Add continueOnFailure option for set AccessControlRecursive methods
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoningLiu committed Jul 28, 2020
1 parent ec68624 commit a64df9b
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ export interface PathChangeAccessControlRecursiveOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
batchSize?: number;
continuationToken?: string;
continueOnFailure?: boolean;
maxBatches?: number;
onProgress?: (progress: AccessControlChanges) => void;
}
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/storage-file-datalake/src/clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export class DataLakePathClient extends StorageClient {
acl: toAclString(acl as PathAccessControlItem[]),
maxRecords: options.batchSize,
continuation: continuationToken,
forceFlag: options.continueOnFailure,
spanOptions
});
batchCounter++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,14 @@ export interface PathUpdateOptionalParams extends coreHttp.RequestOptionsBase {
* operation.
*/
continuation?: string;
/**
* Optional. Valid for "SetAccessControlRecursive" operation. If set to false, the operation will
* terminate quickly on encountering user errors (4XX). If true, the operation will ignore user
* errors and proceed with the operation on other sub-entities of the directory. Continuation
* token will only be returned when forceFlag is true in case of user errors. If not set the
* default value is false for this.
*/
forceFlag?: boolean;
/**
* This parameter allows the caller to upload data in parallel and control the order in which it
* is appended to the file. It is required when uploading data to be appended to the file and
Expand Down Expand Up @@ -787,6 +795,14 @@ export interface PathSetAccessControlRecursiveOptionalParams extends coreHttp.Re
* continue deleting the directory.
*/
continuation?: string;
/**
* Optional. Valid for "SetAccessControlRecursive" operation. If set to false, the operation will
* terminate quickly on encountering user errors (4XX). If true, the operation will ignore user
* errors and proceed with the operation on other sub-entities of the directory. Continuation
* token will only be returned when forceFlag is true in case of user errors. If not set the
* default value is false for this.
*/
forceFlag?: boolean;
/**
* Optional. It specifies the maximum number of files or directories on which the acl change will
* be applied. If omitted or greater than 2,000, the request will process up to 2,000 items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ export const expiryOptions: coreHttp.OperationParameter = {
}
}
};
export const forceFlag: coreHttp.OperationQueryParameter = {
parameterPath: [
"options",
"forceFlag"
],
mapper: {
serializedName: "forceFlag",
type: {
name: "Boolean"
}
}
};
export const group: coreHttp.OperationParameter = {
parameterPath: [
"options",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ const updateOperationSpec: coreHttp.OperationSpec = {
Parameters.maxRecords,
Parameters.continuation,
Parameters.mode1,
Parameters.forceFlag,
Parameters.position,
Parameters.retainUncommittedData,
Parameters.close,
Expand Down Expand Up @@ -727,6 +728,7 @@ const setAccessControlRecursiveOperationSpec: coreHttp.OperationSpec = {
Parameters.timeout,
Parameters.continuation,
Parameters.mode1,
Parameters.forceFlag,
Parameters.maxRecords,
Parameters.action3
],
Expand Down
8 changes: 8 additions & 0 deletions sdk/storage/storage-file-datalake/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,14 @@ export interface PathChangeAccessControlRecursiveOptions extends CommonOptions {
* @memberof PathChangeAccessControlRecursiveOptions
*/
maxBatches?: number;
/**
* Optional. Default false. If set to false, the operation will terminate quickly on encountering user failures.
* If true, the operation will ignore user failures and proceed with the operation on other sub-entities of the directory.
*
* @type {boolean}
* @memberof PathChangeAccessControlRecursiveOptions
*/
continueOnFailure?: boolean;
/**
* Continuation token to continue next batch of operations.
*
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-file-datalake/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enable-xml: true
generate-metadata: false
license-header: MICROSOFT_MIT_NO_VERSION
output-folder: ../src/generated
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2019-12-12/DataLakeStorage.json
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2020-02-10/DataLakeStorage.json
model-date-time-as-string: true
optional-response-headers: true
enum-types: true
Expand Down

0 comments on commit a64df9b

Please sign in to comment.