Buckets - Generate Credentials
Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date and time of key pair (in UTC).
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials?api-version=2026-01-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
account
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$ |
The name of the NetApp account |
|
bucket
|
path | True |
string minLength: 3maxLength: 63 pattern: ^([a-z]|(\d(?!\d{0,2}\.\d{1,3}\.\d{1,3}\.\d{1,3})))([a-z\d]|(\.(?!(\.|-)))|(-(?!\.))){1,61}[a-z\d]$ |
The name of the bucket |
|
pool
|
path | True |
string minLength: 1maxLength: 64 pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$ |
The name of the capacity pool |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
volume
|
path | True |
string minLength: 1maxLength: 64 pattern: ^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$ |
The name of the volume |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| keyPairExpiryDays |
integer (int32) minimum: 1 |
The number of days from now until the newly generated Access and Secret key pair will expire. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Buckets_GenerateCredentials
Sample request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/buckets/bucket1/generateCredentials?api-version=2026-01-01
{
"keyPairExpiryDays": 3
}
Sample response
{
"accessKey": "<REDACTED>",
"keyPairExpiry": "2027-08-15T13:23:33Z",
"secretKey": "<REDACTED>"
}
Definitions
| Name | Description |
|---|---|
|
Bucket |
The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now. |
|
Bucket |
Bucket Access Key, Secret Key, and Expiry date and time of the key pair |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
BucketCredentialsExpiry
The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now.
| Name | Type | Description |
|---|---|---|
| keyPairExpiryDays |
integer (int32) minimum: 1 |
The number of days from now until the newly generated Access and Secret key pair will expire. |
BucketGenerateCredentials
Bucket Access Key, Secret Key, and Expiry date and time of the key pair
| Name | Type | Description |
|---|---|---|
| accessKey |
string (password) |
The Access Key that is required along with the Secret Key to access the bucket. |
| keyPairExpiry |
string (date-time) |
The bucket's Access and Secret key pair expiry date and time (in UTC). |
| secretKey |
string (password) |
The Secret Key that is required along with the Access Key to access the bucket. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |