BlobRetentionPolicy Class

  • java.lang.Object
    • com.azure.storage.blob.models.BlobRetentionPolicy

public final class BlobRetentionPolicy

the retention policy which determines how long the associated data should persist.

Constructor Summary

Constructor Description
BlobRetentionPolicy()

Creates an instance of BlobRetentionPolicy class.

Method Summary

Modifier and Type Method and Description
Integer getDays()

Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be retained.

boolean isEnabled()

Get the enabled property: Indicates whether a retention policy is enabled for the storage service.

BlobRetentionPolicy setDays(Integer days)

Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be retained.

BlobRetentionPolicy setEnabled(boolean enabled)

Set the enabled property: Indicates whether a retention policy is enabled for the storage service.

Methods inherited from java.lang.Object

Constructor Details

BlobRetentionPolicy

public BlobRetentionPolicy()

Creates an instance of BlobRetentionPolicy class.

Method Details

getDays

public Integer getDays()

Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted.

Returns:

the days value.

isEnabled

public boolean isEnabled()

Get the enabled property: Indicates whether a retention policy is enabled for the storage service.

Returns:

the enabled value.

setDays

public BlobRetentionPolicy setDays(Integer days)

Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted.

Parameters:

days - the days value to set.

Returns:

the BlobRetentionPolicy object itself.

setEnabled

public BlobRetentionPolicy setEnabled(boolean enabled)

Set the enabled property: Indicates whether a retention policy is enabled for the storage service.

Parameters:

enabled - the enabled value to set.

Returns:

the BlobRetentionPolicy object itself.

Applies to