Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR] storage/resource-manager #4907

Closed
wants to merge 1 commit into from
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
56 changes: 56 additions & 0 deletions lib/services/storageManagement2/lib/models/dateAfterCreation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* 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.
*/

'use strict';

/**
* Object to define the number of days after creation.
*
*/
class DateAfterCreation {
/**
* Create a DateAfterCreation.
* @property {number} daysAfterCreationGreaterThan Integer value indicating
* the age in days after creation
*/
constructor() {
}

/**
* Defines the metadata of DateAfterCreation
*
* @returns {object} metadata of DateAfterCreation
*
*/
mapper() {
return {
required: false,
serializedName: 'DateAfterCreation',
type: {
name: 'Composite',
className: 'DateAfterCreation',
modelProperties: {
daysAfterCreationGreaterThan: {
required: true,
serializedName: 'daysAfterCreationGreaterThan',
constraints: {
InclusiveMinimum: 0
},
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = DateAfterCreation;
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* 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.
*/

'use strict';

/**
* Object to define the number of days after last modification.
*
*/
class DateAfterModification {
/**
* Create a DateAfterModification.
* @property {number} daysAfterModificationGreaterThan Integer value
* indicating the age in days after last modification
*/
constructor() {
}

/**
* Defines the metadata of DateAfterModification
*
* @returns {object} metadata of DateAfterModification
*
*/
mapper() {
return {
required: false,
serializedName: 'DateAfterModification',
type: {
name: 'Composite',
className: 'DateAfterModification',
modelProperties: {
daysAfterModificationGreaterThan: {
required: true,
serializedName: 'daysAfterModificationGreaterThan',
constraints: {
InclusiveMinimum: 0
},
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = DateAfterModification;
165 changes: 138 additions & 27 deletions lib/services/storageManagement2/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,144 @@ export interface ListServiceSasResponse {
readonly serviceSasToken?: string;
}

/**
* Object to define the number of days after last modification.
*/
export interface DateAfterModification {
/**
* Integer value indicating the age in days after last modification
*/
daysAfterModificationGreaterThan: number;
}

/**
* Management policy action for base blob.
*/
export interface ManagementPolicyBaseBlob {
/**
* The function to tier blobs to cool storage. Support blobs currently at Hot tier
*/
tierToCool?: DateAfterModification;
/**
* The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier
*/
tierToArchive?: DateAfterModification;
/**
* The function to delete the blob
*/
deleteProperty?: DateAfterModification;
}

/**
* Object to define the number of days after creation.
*/
export interface DateAfterCreation {
/**
* Integer value indicating the age in days after creation
*/
daysAfterCreationGreaterThan: number;
}

/**
* Management policy action for snapshot.
*/
export interface ManagementPolicySnapShot {
/**
* The function to delete the blob snapshot
*/
deleteProperty?: DateAfterCreation;
}

/**
* Actions are applied to the filtered blobs when the execution condition is met.
*/
export interface ManagementPolicyAction {
/**
* The management policy action for base blob
*/
baseBlob?: ManagementPolicyBaseBlob;
/**
* The management policy action for snapshot
*/
snapshot?: ManagementPolicySnapShot;
}

/**
* Filters limit rule actions to a subset of blobs within the storage account. If multiple filters
* are defined, a logical AND is performed on all filters.
*/
export interface ManagementPolicyFilter {
/**
* An array of strings for prefixes to be match.
*/
prefixMatch?: string[];
/**
* An array of predefined enum values. Only blockBlob is supported.
*/
blobTypes: string[];
}

/**
* An object that defines the Lifecycle rule. Each definition is made up with a filters set and an
* actions set.
*/
export interface ManagementPolicyDefinition {
/**
* An object that defines the action set.
*/
actions: ManagementPolicyAction;
/**
* An object that defines the filter set.
*/
filters?: ManagementPolicyFilter;
}

/**
* An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.
*/
export interface ManagementPolicyRule {
/**
* Rule is enabled if set to true.
*/
enabled?: boolean;
/**
* A rule name can contain any combination of alpha numeric characters. Rule name is
* case-sensitive. It must be unique within a policy.
*/
name: string;
/**
* An object that defines the Lifecycle rule.
*/
definition: ManagementPolicyDefinition;
}

/**
* The Storage Account ManagementPolicies Rules. See more details in:
* https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
*/
export interface ManagementPolicySchema {
/**
* The Storage Account ManagementPolicies Rules. See more details in:
* https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
*/
rules: ManagementPolicyRule[];
}

/**
* The Get Storage Account ManagementPolicies operation response.
*/
export interface ManagementPolicy extends Resource {
/**
* Returns the date and time the ManagementPolicies was last modified.
*/
readonly lastModifiedTime?: Date;
/**
* The Storage Account ManagementPolicy, in JSON format. See more details in:
* https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
*/
policy: ManagementPolicySchema;
}

/**
* The resource model definition for a ARM proxy resource. It will have everything other than
* required location and tags
Expand Down Expand Up @@ -1274,33 +1412,6 @@ export interface BlobServiceProperties extends Resource {
deleteRetentionPolicy?: DeleteRetentionPolicy;
}

/**
* The Get Storage Account ManagementPolicies operation response.
*/
export interface StorageAccountManagementPolicies extends Resource {
/**
* The Storage Account ManagementPolicies Rules, in JSON format. See more details in:
* https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
*/
policy?: any;
/**
* Returns the date and time the ManagementPolicies was last modified.
*/
readonly lastModifiedTime?: Date;
}

/**
* The Storage Account ManagementPolicies Rules, in JSON format. See more details in:
* https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
*/
export interface ManagementPoliciesRulesSetParameter {
/**
* The Storage Account ManagementPolicies Rules, in JSON format. See more details in:
* https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
*/
policy?: any;
}

/**
* Result of the request to list Storage operations. It contains a list of operations and a URL
* link to get the next set of results.
Expand Down
12 changes: 10 additions & 2 deletions lib/services/storageManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ exports.AccountSasParameters = require('./accountSasParameters');
exports.ListAccountSasResponse = require('./listAccountSasResponse');
exports.ServiceSasParameters = require('./serviceSasParameters');
exports.ListServiceSasResponse = require('./listServiceSasResponse');
exports.DateAfterModification = require('./dateAfterModification');
exports.ManagementPolicyBaseBlob = require('./managementPolicyBaseBlob');
exports.DateAfterCreation = require('./dateAfterCreation');
exports.ManagementPolicySnapShot = require('./managementPolicySnapShot');
exports.ManagementPolicyAction = require('./managementPolicyAction');
exports.ManagementPolicyFilter = require('./managementPolicyFilter');
exports.ManagementPolicyDefinition = require('./managementPolicyDefinition');
exports.ManagementPolicyRule = require('./managementPolicyRule');
exports.ManagementPolicySchema = require('./managementPolicySchema');
exports.ManagementPolicy = require('./managementPolicy');
exports.ProxyResource = require('./proxyResource');
exports.AzureEntityResource = require('./azureEntityResource');
exports.UpdateHistoryProperty = require('./updateHistoryProperty');
Expand All @@ -68,8 +78,6 @@ exports.CorsRule = require('./corsRule');
exports.CorsRules = require('./corsRules');
exports.DeleteRetentionPolicy = require('./deleteRetentionPolicy');
exports.BlobServiceProperties = require('./blobServiceProperties');
exports.StorageAccountManagementPolicies = require('./storageAccountManagementPolicies');
exports.ManagementPoliciesRulesSetParameter = require('./managementPoliciesRulesSetParameter');
exports.OperationListResult = require('./operationListResult');
exports.StorageSkuListResult = require('./storageSkuListResult');
exports.StorageAccountListResult = require('./storageAccountListResult');
Expand Down
Loading