< Back
Set-AzureRmDataLakeStoreItemExpiry
Post
NAME Set-AzureRmDataLakeStoreItemExpiry
SYNOPSIS
Sets or removes the expire time for a file in an Azure Data Lake Store account.
SYNTAX
Set-AzureRmDataLakeStoreItemExpiry [-Account] <String> [-Path] <DataLakeStorePathInstance> [[-Expiration] <DateTimeOffset>] [-DefaultProfile
<IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-AzureRmDataLakeStoreItemExpiry [-Account] <String> [-Path] <DataLakeStorePathInstance> [-RelativeFileExpiryOption] {RelativeToNow |
RelativeToCreationDate} [[-RelativeTime] <Int64>] [-DefaultProfile <IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmDataLakeStoreItemExpiry cmdlet sets or removes the expire time for a file in an Azure Data Lake Store account.
PARAMETERS
-Account <String>
Specifies the Data Lake Store account name.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Expiration <DateTimeOffset>
The absolute expiration time for the specified file. If no value or set to MaxValue, the file will never expire.
Required? false
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RelativeFileExpiryOption <PathRelativeExpiryOptions>
Relative expiry options. RelativeToNow or RelativeToCreationDate are current options
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Path <DataLakeStorePathInstance>
Specifies the Data Lake Store path of the file item for which to set or remove expiry.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RelativeTime <Int64>
The relative time in milliseconds with respect to now or creation time
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
DataLakeStoreItem
The updated file with a new expiration time.
NOTES
Alias: Set-AdlStoreItemExpiry
Example 1: Set the expiration time for a file
PS C:\\> Set-AzureRmDataLakeStoreItemExpiry -AccountName "ContosoADL" -Path /myfile.txt -Expiration [DateTimeOffset]::Now.AddHours(2)
Sets expiration on the file myfile.txt in account ContosoADL to be two hours from now. This will cause the file to expire (be marked for delete)
in two hours.
Example 2: Remove the expiration on a file
PS C:\\> Set-AzureRmDataLakeStoreItemExpiry -AccountName "ContosoADL" -Path /myfile.txt
Removes any expiration that was previously set on file 'myfile.txt' in account 'ContosoADL'. This means the file will not automatically expire (be
marked for delete) and will need to be manually deleted or set to expire again.
Example 3: Set expiration time for a file relative to now
PS C:\\> Set-AdlStoreItemExpiry -Account "ContosoADL" -path /myfile.txt -RelativeFileExpiryOption RelativeToNow -RelativeTime 240000
PS C:\\> Set-AdlStoreItemExpiry -Account "ContosoADL" -path /myfile.txt -RelativeFileExpiryOption RelativeToCreationDate -RelativeTime 240000
The first command sets the expiration time of the file /myfile.txt 240 seconds relative to current time at server.
The second command sets the expiration time of the file /myfile.txt 240 seconds relative to creation time at server.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... itemexpiry
Get-AzureRmDataLakeStoreItem
SYNOPSIS
Sets or removes the expire time for a file in an Azure Data Lake Store account.
SYNTAX
Set-AzureRmDataLakeStoreItemExpiry [-Account] <String> [-Path] <DataLakeStorePathInstance> [[-Expiration] <DateTimeOffset>] [-DefaultProfile
<IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-AzureRmDataLakeStoreItemExpiry [-Account] <String> [-Path] <DataLakeStorePathInstance> [-RelativeFileExpiryOption] {RelativeToNow |
RelativeToCreationDate} [[-RelativeTime] <Int64>] [-DefaultProfile <IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmDataLakeStoreItemExpiry cmdlet sets or removes the expire time for a file in an Azure Data Lake Store account.
PARAMETERS
-Account <String>
Specifies the Data Lake Store account name.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Expiration <DateTimeOffset>
The absolute expiration time for the specified file. If no value or set to MaxValue, the file will never expire.
Required? false
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RelativeFileExpiryOption <PathRelativeExpiryOptions>
Relative expiry options. RelativeToNow or RelativeToCreationDate are current options
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Path <DataLakeStorePathInstance>
Specifies the Data Lake Store path of the file item for which to set or remove expiry.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RelativeTime <Int64>
The relative time in milliseconds with respect to now or creation time
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
DataLakeStoreItem
The updated file with a new expiration time.
NOTES
Alias: Set-AdlStoreItemExpiry
Example 1: Set the expiration time for a file
PS C:\\> Set-AzureRmDataLakeStoreItemExpiry -AccountName "ContosoADL" -Path /myfile.txt -Expiration [DateTimeOffset]::Now.AddHours(2)
Sets expiration on the file myfile.txt in account ContosoADL to be two hours from now. This will cause the file to expire (be marked for delete)
in two hours.
Example 2: Remove the expiration on a file
PS C:\\> Set-AzureRmDataLakeStoreItemExpiry -AccountName "ContosoADL" -Path /myfile.txt
Removes any expiration that was previously set on file 'myfile.txt' in account 'ContosoADL'. This means the file will not automatically expire (be
marked for delete) and will need to be manually deleted or set to expire again.
Example 3: Set expiration time for a file relative to now
PS C:\\> Set-AdlStoreItemExpiry -Account "ContosoADL" -path /myfile.txt -RelativeFileExpiryOption RelativeToNow -RelativeTime 240000
PS C:\\> Set-AdlStoreItemExpiry -Account "ContosoADL" -path /myfile.txt -RelativeFileExpiryOption RelativeToCreationDate -RelativeTime 240000
The first command sets the expiration time of the file /myfile.txt 240 seconds relative to current time at server.
The second command sets the expiration time of the file /myfile.txt 240 seconds relative to creation time at server.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... itemexpiry
Get-AzureRmDataLakeStoreItem