Interface BlobContainers
public interface BlobContainers
Type representing BlobContainers.
-
Method Summary
Modifier and TypeMethodDescriptionclearLegalHold(String resourceGroupName, String accountName, String containerName, List<String> tags) Clears legal hold tags.clearLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List<String> tags) Clears legal hold tags.defineContainer(String name) Begins definition for a new Container resource.Begins definition for a new ImmutabilityPolicy resource.Deprecated.voidDeletes specified container under its account.deleteAsync(String resourceGroupName, String accountName, String containerName) Deletes specified container under its account.voiddeleteImmutabilityPolicy(String resourceGroupName, String accountName, String containerName) Deprecated.voiddeleteImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String eTagValue) Aborts an unlocked immutability policy.deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) Aborts an unlocked immutability policy.deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String eTagValue) Aborts an unlocked immutability policy.extendImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites) extendImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites, String eTagValue) Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy.extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites) Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy.extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites, String eTagValue) Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy.Gets properties of a specified container.Gets properties of a specified container.getImmutabilityPolicy(String resourceGroupName, String accountName, String containerName) Gets the existing immutability policy along with the corresponding ETag in response headers and body.getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) Gets the existing immutability policy along with the corresponding ETag in response headers and body.getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String eTagValue) Gets the existing immutability policy along with the corresponding ETag in response headers and body.com.azure.core.http.rest.PagedIterable<ListContainerItemInner>Lists all containers and does not support a prefix like data plane.com.azure.core.http.rest.PagedFlux<ListContainerItemInner>Lists all containers and does not support a prefix like data plane.lockImmutabilityPolicy(String resourceGroupName, String accountName, String containerName) Deprecated.lockImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String eTagValue) Sets the ImmutabilityPolicy to Locked state.lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) Sets the ImmutabilityPolicy to Locked state.lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String eTagValue) Sets the ImmutabilityPolicy to Locked state.Sets legal hold tags.setLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List<String> tags) Sets legal hold tags.
-
Method Details
-
defineContainer
Begins definition for a new Container resource.- Parameters:
name- resource name.- Returns:
- the first stage of the new Container definition.
-
defineImmutabilityPolicy
Deprecated.Begins definition for a new ImmutabilityPolicy resource.- Parameters:
name- resource name.- Returns:
- the first stage of the new ImmutabilityPolicy definition.
-
defineImmutabilityPolicy
ImmutabilityPolicy.DefinitionStages.Blank defineImmutabilityPolicy()Begins definition for a new ImmutabilityPolicy resource.- Returns:
- the first stage of the new ImmutabilityPolicy definition.
-
listAsync
com.azure.core.http.rest.PagedFlux<ListContainerItemInner> listAsync(String resourceGroupName, String accountName) Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
getAsync
Gets properties of a specified container.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
deleteAsync
Deletes specified container under its account.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
setLegalHoldAsync
Mono<LegalHold> setLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List<String> tags) Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.tags- Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
clearLegalHoldAsync
Mono<LegalHold> clearLegalHoldAsync(String resourceGroupName, String accountName, String containerName, List<String> tags) Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.tags- Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
getImmutabilityPolicyAsync
Mono<ImmutabilityPolicy> getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) Gets the existing immutability policy along with the corresponding ETag in response headers and body.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
getImmutabilityPolicyAsync
Mono<ImmutabilityPolicy> getImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String eTagValue) Gets the existing immutability policy along with the corresponding ETag in response headers and body.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.eTagValue- The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
deleteImmutabilityPolicyAsync
Mono<Void> deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
deleteImmutabilityPolicyAsync
Mono<Void> deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String eTagValue) Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.eTagValue- The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
lockImmutabilityPolicyAsync
Mono<ImmutabilityPolicy> lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName) Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
lockImmutabilityPolicyAsync
Mono<ImmutabilityPolicy> lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String eTagValue) Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.eTagValue- The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
extendImmutabilityPolicyAsync
Mono<ImmutabilityPolicy> extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites) Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.immutabilityPeriodSinceCreationInDays- The immutability period for the blobs in the container since the policy creation, in days.allowProtectedAppendWrites- This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
extendImmutabilityPolicyAsync
Mono<ImmutabilityPolicy> extendImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites, String eTagValue) Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.immutabilityPeriodSinceCreationInDays- The immutability period for the blobs in the container since the policy creation, in days.allowProtectedAppendWrites- This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.eTagValue- The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.- Returns:
- the observable for the request
- Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
list
com.azure.core.http.rest.PagedIterable<ListContainerItemInner> list(String resourceGroupName, String accountName) Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.- Returns:
- response schema.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
get
Gets properties of a specified container.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Returns:
- properties of a specified container.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
delete
Deletes specified container under its account.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
setLegalHold
LegalHold setLegalHold(String resourceGroupName, String accountName, String containerName, List<String> tags) Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.tags- Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.- Returns:
- the LegalHold property of a blob container.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
clearLegalHold
LegalHold clearLegalHold(String resourceGroupName, String accountName, String containerName, List<String> tags) Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.tags- Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.- Returns:
- the LegalHold property of a blob container.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getImmutabilityPolicy
ImmutabilityPolicy getImmutabilityPolicy(String resourceGroupName, String accountName, String containerName) Gets the existing immutability policy along with the corresponding ETag in response headers and body.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Returns:
- the existing immutability policy along with the corresponding ETag in response headers and body.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteImmutabilityPolicy
@Deprecated void deleteImmutabilityPolicy(String resourceGroupName, String accountName, String containerName) Deprecated.Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
lockImmutabilityPolicy
@Deprecated ImmutabilityPolicy lockImmutabilityPolicy(String resourceGroupName, String accountName, String containerName) Deprecated.Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.- Returns:
- the ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
extendImmutabilityPolicy
@Deprecated ImmutabilityPolicy extendImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites) Deprecated.Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.immutabilityPeriodSinceCreationInDays- The immutability period for the blobs in the container since the policy creation, in days.allowProtectedAppendWrites- This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.- Returns:
- the ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteImmutabilityPolicy
void deleteImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String eTagValue) Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.eTagValue- The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
lockImmutabilityPolicy
ImmutabilityPolicy lockImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String eTagValue) Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.eTagValue- The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.- Returns:
- the ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
extendImmutabilityPolicy
ImmutabilityPolicy extendImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, Boolean allowProtectedAppendWrites, String eTagValue) Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.- Parameters:
resourceGroupName- The name of the resource group within the user's subscription. The name is case insensitive.accountName- The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.containerName- The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.immutabilityPeriodSinceCreationInDays- The immutability period for the blobs in the container since the policy creation, in days.allowProtectedAppendWrites- This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.eTagValue- The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.- Returns:
- the ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
defineImmutabilityPolicy()