Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
83 changes: 83 additions & 0 deletions specification/storage/Storage.Management/StorageConnector.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./StorageAccount.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using TypeSpec.Versioning;

namespace Microsoft.Storage;
/**
* A Connector is a tracked ARM resource modeled as a sub-resource of a Storage Account.
*/
@parentResource(StorageAccount)
@added(Versions.v2025_08_01)
model Connector
is Azure.ResourceManager.TrackedResource<StorageConnectorProperties> {
...ResourceNameParameter<
Resource = Connector,
KeyName = "connectorName",
SegmentName = "connectors",
NamePattern = "^[a-z0-9](?!.*--)[a-z0-9-]{1,61}[a-z0-9]$"
>;
}

@armResourceOperations
@added(Versions.v2025_08_01)
interface Connectors {
/**
* Get the specified Storage Connector.
*/
get is ArmResourceRead<Connector>;

/**
* Create a Storage Connector if it does not already exist; otherwise, error out. This API will not allow you to replace an already existing resource.
*/
create is ArmResourceCreateOrReplaceAsync<Connector>;

/**
* Update a Storage Connector.
*/
update is ArmResourcePatchAsync<Connector, StorageConnectorProperties>;

/**
* Delete a Storage Connector.
*/
delete is ArmResourceDeleteWithoutOkAsync<Connector>;

/**
* List all Storage Connectors in a Storage Account.
*/
listByStorageAccount is ArmResourceListByParent<Connector>;

/**
* This method is used to verify that the connection to the backing data store works.
* This API is designed to be used for monitoring and debugging purposes. From the caller’s perspective,
* this method does the following: Calls List on the backing data store, attempting to list up to one blob/object/etc.
* If the above succeeds, and if a blob/object/etc is found, calls Get on that object, attempting to download one byte.
*/
testExistingConnection is ArmResourceActionAsync<
Connector,
TestExistingConnectionRequest,
TestConnectionResponse
>;
}

@@maxLength(Connector.name, 63);
@@minLength(Connector.name, 3);
@@doc(Connector.name, "The name of the Storage Connector.");
@@doc(Connector.properties, "The properties of the Storage Connector.");
@@doc(Connectors.create::parameters.resource,
"Create a Storage Connector if it does not already exist; otherwise, error out. This API will not allow you to replace an already existing resource."
);
@@doc(Connectors.update::parameters.properties,
"The updated properties of the Storage Connector."
);
@@doc(Connectors.testExistingConnection::parameters.body,
"This method is used to verify that the connection to the backing data store works. This API is designed to be used for monitoring and debugging purposes. From the caller’s perspective, this method does the following: Calls List on the backing data store, attempting to list up to one blob/object/etc. If the above succeeds, and if a blob/object/etc is found, calls Get on that object, attempting to download one byte."
);
68 changes: 68 additions & 0 deletions specification/storage/Storage.Management/StorageDataShare.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./StorageAccount.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using TypeSpec.Versioning;

namespace Microsoft.Storage;
/**
* A DataShare is a tracked ARM resource modeled as a sub-resource of a Storage Account.
*/
@parentResource(StorageAccount)
@added(Versions.v2025_08_01)
model DataShare
is Azure.ResourceManager.TrackedResource<StorageDataShareProperties> {
...ResourceNameParameter<
Resource = DataShare,
KeyName = "dataShareName",
SegmentName = "dataShares",
NamePattern = "^[a-z0-9](?!.*--)[a-z0-9-]{1,61}[a-z0-9]$"
>;
}

@armResourceOperations
@added(Versions.v2025_08_01)
interface DataShares {
/**
* Get the specified Storage DataShare.
*/
get is ArmResourceRead<DataShare>;

/**
* Create a Storage DataShare if it does not already exist; otherwise, error out. This API will not allow you to replace an already existing resource.
*/
create is ArmResourceCreateOrReplaceAsync<DataShare>;

/**
* Update a Storage DataShare.
*/
update is ArmResourcePatchAsync<DataShare, StorageDataShareProperties>;

/**
* Delete a Storage DataShare.
*/
delete is ArmResourceDeleteWithoutOkAsync<DataShare>;

/**
* List all Storage DataShares in a Storage Account.
*/
listByStorageAccount is ArmResourceListByParent<DataShare>;
}

@@maxLength(DataShare.name, 63);
@@minLength(DataShare.name, 3);
@@doc(DataShare.name, "The name of the Storage DataShare.");
@@doc(DataShare.properties, "The properties of the Storage DataShare.");
@@doc(DataShares.create::parameters.resource,
"Create a Storage DataShare if it does not already exist; otherwise, error out. This API will not allow you to replace an already existing resource."
);
@@doc(DataShares.update::parameters.properties,
"The updated properties of the Storage DataShare."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"LegalHold": {
"tags": [
"tag1",
"tag2",
"tag3"
]
},
"accountName": "sto7280",
"api-version": "2025-08-01",
"containerName": "container8723",
"monitor": "true",
"resourceGroupName": "res4303",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"hasLegalHold": false,
"tags": []
}
}
},
"operationId": "BlobContainers_ClearLegalHold",
"title": "ClearLegalHoldContainers"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"accountName": "sto4506",
"api-version": "2025-08-01",
"containerName": "container9689",
"monitor": "true",
"resourceGroupName": "res4079",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {},
"204": {}
},
"operationId": "BlobContainers_Delete",
"title": "DeleteContainers"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"If-Match": "8d59f81a7fa7be0",
"accountName": "sto9621",
"api-version": "2025-08-01",
"containerName": "container4910",
"immutabilityPolicyName": "default",
"monitor": "true",
"resourceGroupName": "res1581",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"name": "default",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies",
"etag": "\"8d59f81a87b40c0\"",
"id": "/subscriptions/{subscription-id}/resourceGroups/res1581/providers/Microsoft.Storage/storageAccounts/sto9621/blobServices/default/containers/container4910/immutabilityPolicies/default",
"properties": {
"immutabilityPeriodSinceCreationInDays": 0,
"state": "Unlocked"
}
}
}
},
"operationId": "BlobContainers_DeleteImmutabilityPolicy",
"title": "DeleteImmutabilityPolicy"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"If-Match": "8d59f830d0c3bf9",
"accountName": "sto232",
"api-version": "2025-08-01",
"containerName": "container5023",
"monitor": "true",
"parameters": {
"properties": {
"immutabilityPeriodSinceCreationInDays": 100
}
},
"resourceGroupName": "res6238",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"name": "default",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies",
"etag": "\"8d57a8b2ff50332\"",
"id": "/subscriptions/{subscription-id}/resourceGroups/res6238/providers/Microsoft.Storage/storageAccounts/sto232/blobServices/default/containers/container5023/immutabilityPolicies/default",
"properties": {
"immutabilityPeriodSinceCreationInDays": 100,
"state": "Locked"
}
}
}
},
"operationId": "BlobContainers_ExtendImmutabilityPolicy",
"title": "ExtendImmutabilityPolicy"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"parameters": {
"accountName": "sto6217",
"api-version": "2025-08-01",
"containerName": "container1634",
"monitor": "true",
"resourceGroupName": "res9871",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"name": "container1634",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"etag": "\"0x8D592D74CC20EBA\"",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634",
"properties": {
"hasImmutabilityPolicy": true,
"hasLegalHold": true,
"immutabilityPolicy": {
"etag": "\"8d592d74cb3011a\"",
"properties": {
"immutabilityPeriodSinceCreationInDays": 100,
"state": "Locked"
},
"updateHistory": [
{
"immutabilityPeriodSinceCreationInDays": 3,
"objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"timestamp": "2018-03-26T05:06:11.431403Z",
"update": "put"
},
{
"immutabilityPeriodSinceCreationInDays": 3,
"objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"timestamp": "2018-03-26T05:06:13.0907641Z",
"update": "lock"
},
{
"immutabilityPeriodSinceCreationInDays": 100,
"objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"timestamp": "2018-03-26T05:06:14.7097716Z",
"update": "extend"
}
]
},
"lastModifiedTime": "2018-03-26T05:06:14Z",
"leaseState": "Available",
"leaseStatus": "Unlocked",
"legalHold": {
"hasLegalHold": true,
"tags": [
{
"objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
"tag": "tag1",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"timestamp": "2018-03-26T05:06:09.6964643Z"
},
{
"objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
"tag": "tag2",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"timestamp": "2018-03-26T05:06:09.6964643Z"
},
{
"objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b",
"tag": "tag3",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"timestamp": "2018-03-26T05:06:09.6964643Z"
}
]
},
"publicAccess": "None"
}
}
}
},
"operationId": "BlobContainers_Get",
"title": "GetContainers"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"accountName": "sto9177",
"api-version": "2025-08-01",
"containerName": "container3489",
"immutabilityPolicyName": "default",
"monitor": "true",
"resourceGroupName": "res5221",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"name": "default",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies",
"etag": "\"8d59f828e64b75c\"",
"id": "/subscriptions/{subscription-id}/resourceGroups/res5221/providers/Microsoft.Storage/storageAccounts/sto9177/blobServices/default/containers/container3489/immutabilityPolicies/default",
"properties": {
"allowProtectedAppendWrites": true,
"immutabilityPeriodSinceCreationInDays": 5,
"state": "Unlocked"
}
}
}
},
"operationId": "BlobContainers_GetImmutabilityPolicy",
"title": "GetImmutabilityPolicy"
}
Loading
Loading