Skip to content

Commit f2e9cca

Browse files
joschungkimsteven5
andauthored
[AzureDataTransfer] Introduce 2025-05-30-Preview version with TypeSpec (#36400)
* init * doc update * readme * spell check * spell check + examples * sdk build fail * avocado * avocado + modelvalidation + sdk * update * model validation + prettier check * prettier * updates * readme * lint diff -1 * lint diff - 2 * lint diff - 3 * sdk validation - js - 1 * sdk validation - js - 2 * sdk validation - js - 3 * sdk validation - js - 4 * sdk validation - js - 5 * init * get rid of armresponse * Updated the description of Authentication properties within apiFlowOptions and remoteEndpointSettings * pipeline update * readmin * readme - 2 * reintroduce responsbe wrapper * done * reintroduce response wrapper and response model + dont remove old properties * missed connectionresponse * missing another connectionresponse * examples update * prettier * remove suppressions * remove readme suppresion 1 * remove readme suppresion 2 * reintroduce readme suppresion 2 * disabled flow types and dataclass * readme * format * remove unnecessary models * remove suppressions * suppression fix * connection? * @list? * lint * example * fixes * please fix everything * omg yes * remove breaking changes T.T * examples * example ref * Updated the description of fields in the apiFlowOptions --------- Co-authored-by: Steven Kim <[email protected]>
1 parent 371e4d2 commit f2e9cca

File tree

103 files changed

+10152
-184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+10152
-184
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@typespec/openapi";
4+
import "@typespec/rest";
5+
import "./models.tsp";
6+
import "./Pipeline.tsp";
7+
import "./models.flowprofile.tsp";
8+
9+
using TypeSpec.Rest;
10+
using Azure.ResourceManager;
11+
using TypeSpec.Http;
12+
using TypeSpec.Versioning;
13+
14+
@versioned(Versions)
15+
namespace Microsoft.AzureDataTransfer;
16+
17+
/**
18+
* Represents a FlowProfile Azure resource, which defines a data replication scenario with a specific data classification and a set of configurable policy rules.
19+
*/
20+
@added(Versions.v2025_05_30_preview)
21+
@parentResource(Pipeline)
22+
model FlowProfile
23+
is Azure.ResourceManager.TrackedResource<FlowProfileProperties> {
24+
...ResourceNameParameter<
25+
Resource = FlowProfile,
26+
KeyName = "flowProfileName",
27+
SegmentName = "flowProfiles",
28+
NamePattern = "^[a-zA-Z0-9-]{3,64}$"
29+
>;
30+
...Azure.ResourceManager.ManagedServiceIdentityProperty;
31+
}
32+
33+
/**
34+
* Defines the set of operations available for managing FlowProfile resources.
35+
*/
36+
@added(Versions.v2025_05_30_preview)
37+
@armResourceOperations
38+
interface FlowProfiles {
39+
/**
40+
* Retrieves the specified FlowProfile resource.
41+
*/
42+
get is ArmResourceRead<FlowProfile>;
43+
44+
/**
45+
* Creates a new FlowProfile or updates an existing one.
46+
*/
47+
createOrUpdate is ArmResourceCreateOrReplaceAsync<FlowProfile>;
48+
49+
/**
50+
* Applies partial updates to an existing FlowProfile resource.
51+
*/
52+
@patch(#{ implicitOptionality: false })
53+
update is ArmCustomPatchAsync<FlowProfile, PatchModel = FlowProfilePatch>;
54+
55+
/**
56+
* Deletes the specified FlowProfile resource.
57+
*/
58+
delete is ArmResourceDeleteWithoutOkAsync<FlowProfile>;
59+
60+
/**
61+
* Lists all FlowProfiles under a given Pipeline.
62+
*/
63+
listByPipeline is ArmResourceListByParent<FlowProfile>;
64+
}
65+
66+
@@maxLength(FlowProfile.name, 64);
67+
@@minLength(FlowProfile.name, 3);
68+
@@doc(FlowProfile.name,
69+
"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens."
70+
);
71+
@@doc(FlowProfile.properties,
72+
"The set of configuration properties that define the behavior and rules of the FlowProfile."
73+
);
74+
@@doc(FlowProfiles.createOrUpdate::parameters.resource,
75+
"The FlowProfile resource definition to create or update."
76+
);
77+
@@doc(FlowProfiles.update::parameters.properties,
78+
"The FlowProfile patch definition containing the properties to update."
79+
);

specification/azuredatatransfer/AzureDataTransfer.Management/Pipeline.tsp

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ using Azure.ClientGenerator.Core;
1010
using Azure.ResourceManager;
1111
using TypeSpec.Http;
1212
using TypeSpec.OpenAPI;
13+
using TypeSpec.Versioning;
1314

1415
namespace Microsoft.AzureDataTransfer;
16+
1517
/**
16-
* The pipeline resource definition.
18+
* The pipeline resource definition. A Pipeline defines the scope and identity under which data replication scenarios are managed.
1719
*/
1820
model Pipeline is Azure.ResourceManager.TrackedResource<PipelineProperties> {
1921
...ResourceNameParameter<
@@ -27,20 +29,23 @@ model Pipeline is Azure.ResourceManager.TrackedResource<PipelineProperties> {
2729

2830
model ArmPipelineResponse is ArmResponse<Pipeline>;
2931

32+
/**
33+
* Defines the set of operations available for managing Pipeline resources.
34+
*/
3035
@armResourceOperations
3136
interface Pipelines {
3237
/**
33-
* Gets pipeline resource.
38+
* Retrieves the specified Pipeline resource.
3439
*/
3540
get is ArmResourceRead<Pipeline>;
3641

3742
/**
38-
* Creates or updates the pipeline resource.
43+
* Creates a new Pipeline resource or updates an existing one. This operation is asynchronous and returns the resulting Pipeline.
3944
*/
4045
createOrUpdate is ArmResourceCreateOrReplaceAsync<Pipeline>;
4146

4247
/**
43-
* Updates the pipeline resource.
48+
* Applies partial updates to an existing Pipeline resource. This operation supports patch semantics and returns the updated Pipeline.
4449
*/
4550
#suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "Prior OpenAPI2 Json spec provides the resource back in the LRO response."
4651
@patch(#{ implicitOptionality: false })
@@ -54,22 +59,22 @@ interface Pipelines {
5459
>;
5560

5661
/**
57-
* Deletes the pipeline resource.
62+
* Deletes the specified Pipeline resource.
5863
*/
5964
delete is ArmResourceDeleteWithoutOkAsync<Pipeline>;
6065

6166
/**
62-
* Gets pipelines in a resource group.
67+
* Lists all Pipeline resources within the specified resource group.
6368
*/
6469
listByResourceGroup is ArmResourceListByParent<Pipeline>;
6570

6671
/**
67-
* Gets pipelines in a subscription.
72+
* Lists all Pipeline resources within the current subscription.
6873
*/
6974
listBySubscription is ArmListBySubscription<Pipeline>;
7075

7176
/**
72-
* Approves the specified connection request in a pipeline.
77+
* Approves a pending connection request associated with the specified Pipeline.
7378
*/
7479
approveConnection is ArmResourceActionAsync<
7580
Pipeline,
@@ -78,7 +83,7 @@ interface Pipelines {
7883
>;
7984

8085
/**
81-
* Executes a privileged action for a pipeline.
86+
* Executes a privileged or administrative action on the specified Pipeline.
8287
*/
8388
executeAction is ArmResourceActionAsync<
8489
Pipeline,
@@ -87,17 +92,16 @@ interface Pipelines {
8792
>;
8893

8994
/**
90-
* Lists the flows in a pipeline.
95+
* Lists all Flows associated with the specified Pipeline.
9196
*/
9297
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Operation Id generated does not match original OpenAPIv2 JSON specification."
93-
#suppress "@azure-tools/typespec-client-generator-core/no-unnamed-types" "Backwards compatibility with existing clients."
9498
@action("listFlows")
9599
@operationId("ListFlowsByPipeline_List")
96100
list is ArmResourceActionSync<
97101
Pipeline,
98102
{
99103
/**
100-
* Connection(s) to retrieve flows of
104+
* A list of connection identifiers used to filter the Flows to be retrieved.
101105
*/
102106
@bodyRoot
103107
connections?: ConnectionIdList;
@@ -106,7 +110,7 @@ interface Pipelines {
106110
>;
107111

108112
/**
109-
* Lists the schemas for the specified connection in a pipeline.
113+
* Lists the schemas associated with a specific connection in the Pipeline. This operation has reached end of life support starting version 2025-05-30-preview. For schema support please create and use a FlowProfile resource.
110114
*/
111115
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Operation Id generated does not match original OpenAPIv2 JSON specification."
112116
@action("listSchemas")
@@ -118,7 +122,7 @@ interface Pipelines {
118122
>;
119123

120124
/**
121-
* Rejects the specified connection request in a pipeline.
125+
* Rejects a pending connection request associated with the specified Pipeline.
122126
*/
123127
rejectConnection is ArmResourceActionAsync<
124128
Pipeline,
@@ -129,14 +133,28 @@ interface Pipelines {
129133

130134
@@maxLength(Pipeline.name, 64);
131135
@@minLength(Pipeline.name, 3);
132-
@@doc(Pipeline.name, "The name for the pipeline to perform the operation on.");
133-
@@doc(Pipeline.properties, "Properties of pipeline");
134-
@@doc(Pipelines.createOrUpdate::parameters.resource, "Pipeline body");
135-
@@doc(Pipelines.update::parameters.properties, "Pipeline body");
136-
@@doc(Pipelines.approveConnection::parameters.body, "Connection body");
137-
@@doc(Pipelines.executeAction::parameters.body, "Action to execute");
138-
@@doc(Pipelines.listSchemasList::parameters.body, "Schema(s) to retrieve");
139-
@@doc(Pipelines.rejectConnection::parameters.body, "Connection body");
136+
@@doc(Pipeline.name, "The name of the pipeline on which to operate.");
137+
@@doc(Pipeline.properties,
138+
"The set of configurable properties for the Pipeline resource."
139+
);
140+
@@doc(Pipelines.createOrUpdate::parameters.resource,
141+
"The request body containing the Pipeline definition."
142+
);
143+
@@doc(Pipelines.update::parameters.properties,
144+
"The request body containing the updated Pipeline properties."
145+
);
146+
@@doc(Pipelines.approveConnection::parameters.body,
147+
"The request body containing the connection to approve."
148+
);
149+
@@doc(Pipelines.executeAction::parameters.body,
150+
"The action to be executed on the Pipeline."
151+
);
152+
@@doc(Pipelines.listSchemasList::parameters.body,
153+
"The schema(s) to retrieve for the specified connection."
154+
);
155+
@@doc(Pipelines.rejectConnection::parameters.body,
156+
"The request body containing the connection to reject."
157+
);
140158

141159
@@clientName(Pipelines.createOrUpdate::parameters.resource, "pipeline");
142160
@@clientName(Pipelines.update::parameters.properties, "pipeline");

specification/azuredatatransfer/AzureDataTransfer.Management/ProviderActions.tsp

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,23 @@ import "@azure-tools/typespec-azure-resource-manager";
77
import "@azure-tools/typespec-client-generator-core";
88
import "@typespec/openapi";
99

10-
using TypeSpec.Rest;
1110
using Azure.ResourceManager;
1211
using Azure.ClientGenerator.Core;
12+
using TypeSpec.Http;
1313
using TypeSpec.OpenAPI;
14+
using TypeSpec.Versioning;
15+
using TypeSpec.Rest;
1416

1517
namespace Microsoft.AzureDataTransfer;
1618

19+
/**
20+
* AzureDataTransfer interface defines provider-level operations for managing
21+
* schemas and FlowProfiles in Azure Data Transfer.
22+
*/
1723
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "This interface corresponds to our Provider level actions, no decorator exists for that."
1824
interface AzureDataTransfer {
1925
/**
20-
* Lists approved schemas for Azure Data Transfer.
26+
* Retrieves the list of approved schemas available for Azure Data Transfer. This operation has reached end of life support starting version 2025-05-30-preview. For schema support please create and use a FlowProfile resource.
2127
*/
2228
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Operation Id generated does not match original OpenAPIv2 JSON specification."
2329
@operationId("AzureDataTransfer_listApprovedSchemas")
@@ -26,8 +32,26 @@ interface AzureDataTransfer {
2632
Request = ListApprovedSchemasRequest,
2733
Response = SchemasListResult
2834
>;
35+
36+
/**
37+
* Retrieves a list of FlowProfile resources associated with a specified pipeline.
38+
*/
39+
@added(Versions.v2025_05_30_preview)
40+
@autoRoute
41+
listFlowProfiles is ArmProviderActionSync<
42+
Request = ListFlowProfilesRequest,
43+
Response = {
44+
/**
45+
* A list of FlowProfile metadata created under the specified pipeline.
46+
*/
47+
@added(Versions.v2025_05_30_preview)
48+
@bodyRoot
49+
flowProfileList?: FlowProfileMetadata[];
50+
}
51+
>;
52+
2953
/**
30-
* Validates a schema for Azure Data Transfer.
54+
* Validates the structure and content of a schema for use in Azure Data Transfer. This operation has reached end of life support starting version 2025-05-30-preview. For schema support please create and use a FlowProfile resource.
3155
*/
3256
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Operation Id generated does not match original OpenAPIv2 JSON specification."
3357
@operationId("AzureDataTransfer_validateSchema")
@@ -43,5 +67,5 @@ interface AzureDataTransfer {
4367
);
4468
@@clientName(AzureDataTransfer.validateSchema::parameters.body, "schema");
4569
@@doc(AzureDataTransfer.listApprovedSchemas::parameters.body,
46-
"The request to list approved schemas."
70+
"The request payload for listing approved schemas."
4771
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"title": "AzureDataTransfer_ListFlowProfiles_MaximumSet_Gen - generated by [MaximumSet] rule",
3+
"operationId": "AzureDataTransfer_ListFlowProfiles",
4+
"parameters": {
5+
"api-version": "2025-05-30-preview",
6+
"body": {}
7+
},
8+
"responses": {
9+
"200": {
10+
"body": [
11+
{
12+
"pipeline": "testPipeline",
13+
"name": "testFlowProfileA",
14+
"replicationScenario": "Messaging",
15+
"flowProfileId": "00000000-0000-0000-0000-000000000000",
16+
"status": "Obsolete",
17+
"description": "Testing 123"
18+
}
19+
]
20+
}
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"operationId": "Pipelines_ApproveConnection",
3+
"parameters": {
4+
"api-version": "2025-05-30-preview",
5+
"connection": {
6+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.AzureDataTransfer/connections/testConnection",
7+
"statusReason": "Example reason"
8+
},
9+
"pipelineName": "testPipeline",
10+
"resourceGroupName": "testRG",
11+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
12+
},
13+
"title": "Approves the specified connection in a pipeline",
14+
"responses": {
15+
"200": {
16+
"body": {
17+
"type": "Microsoft.AzureDataTransfer/connections",
18+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.AzureDataTransfer/connections/testConnection",
19+
"location": "East US",
20+
"properties": {
21+
"justification": "justification",
22+
"pipeline": "testdc",
23+
"requirementId": "id"
24+
}
25+
}
26+
},
27+
"202": {
28+
"headers": {
29+
"location": "http://management.azure.com/subscriptions/12345/providers/Microsoft.AzureDataTransfer/locations/eastUS?api-version=2025-05-30-preview"
30+
}
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)