Skip to content
Merged
Show file tree
Hide file tree
Changes from 125 commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
d47ca64
Draft of Unified AI Data Plane TypeSpec
needuv Jan 28, 2025
3b16f0c
fix errors
needuv Jan 28, 2025
7e3de07
add indexes to typespec
needuv Jan 29, 2025
c25ceb6
fix import
needuv Jan 29, 2025
c23d2ef
fix namespace
needuv Jan 29, 2025
de47def
clean up dataset and add in connections
needuv Jan 30, 2025
7bc8b83
fix type discriminator and some bad references
needuv Jan 30, 2025
d752776
fix a typo in UriFileDatasetVersion
needuv Jan 30, 2025
bf7ac9a
remove body from DatasetContainer
needuv Jan 30, 2025
f8a1d4f
fix import
needuv Jan 30, 2025
a19baec
remove creds from connection
needuv Feb 12, 2025
3f424dc
update index to match latest PR
needuv Feb 13, 2025
25b8531
add credentials back to connection
needuv Feb 14, 2025
538face
add getWithSecrets
needuv Feb 14, 2025
eca12fc
fix thing
needuv Feb 14, 2025
b916218
update connection based on spec feedback
needuv Feb 20, 2025
3f26160
add fields to model typespec
needuv Feb 24, 2025
51b3511
add query parameters
needuv Feb 25, 2025
efc3eaf
clean up evals namespace
needuv Feb 25, 2025
464cf9b
change evaluations/create to evaluations:create
needuv Feb 25, 2025
3daf517
fix typo
needuv Feb 25, 2025
fa63ef1
clean up common/models.tsp and add inference APIs
needuv Feb 25, 2025
813f207
fix some errors and rename file
needuv Feb 25, 2025
6c83724
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
needuv Feb 25, 2025
c1fd302
update with latest PR
needuv Feb 25, 2025
7bd9414
make functiondefinition a common model
needuv Feb 26, 2025
bdfd6a3
fix a missing ;
needuv Feb 26, 2025
23d5e2b
Asset contract changes (#32833)
adyada Mar 3, 2025
da96e87
fix some comments
needuv Mar 3, 2025
37f9a36
fix some more comments
needuv Mar 3, 2025
1eeebba
fix some more comments
needuv Mar 3, 2025
82ca70a
fix up pending upload request names
needuv Mar 3, 2025
6547b93
fix dataset route for pending upload
needuv Mar 3, 2025
0d1be7a
attempt to move to azure core operations for connection only
needuv Mar 3, 2025
71c492d
fix connections based on errors
needuv Mar 3, 2025
39e24ae
attempt to fix credentials
needuv Mar 3, 2025
6140053
fix connections list with secrets route
needuv Mar 3, 2025
b42737c
remove @route decorator
needuv Mar 3, 2025
07026b8
make models into a resource
needuv Mar 3, 2025
c7ab298
remove connection paged response
needuv Mar 3, 2025
b717a1f
fix up some issues
needuv Mar 3, 2025
23361ff
update index with latest spec
needuv Mar 5, 2025
459530a
fix duped names
needuv Mar 5, 2025
cf4b9b8
fix thing
needuv Mar 5, 2025
6a6c061
connection id is optional for embedding
needuv Mar 6, 2025
ef6206d
change index create to POST, add cosmosdb as connection type
needuv Mar 6, 2025
cf6afcb
fix tsp error
needuv Mar 6, 2025
9c7951a
First
dargilco Mar 11, 2025
8c827c0
Run `npx tsp format **\*.tsp` (#33117)
dargilco Mar 11, 2025
ddcad33
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
dargilco Mar 11, 2025
6da4036
separate deployments from models
needuv Mar 11, 2025
b112157
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
needuv Mar 11, 2025
b0c8c8f
make asset base an alias
needuv Mar 11, 2025
620252d
fix up some errors in tsp
needuv Mar 11, 2025
e02c662
Run `npx tsp format **\*.tsp` again
dargilco Mar 11, 2025
1470b01
Revert change to client.tsp that got in prematurely. I'll send a PR f…
dargilco Mar 11, 2025
c156acc
Fix all compilation errors (#33143)
dargilco Mar 12, 2025
025e612
Rename root folder to Azure.AI.Projects
needuv Mar 12, 2025
7f74f9d
delete azure.ai.unified dir
needuv Mar 12, 2025
91621e8
clean up connections
needuv Mar 12, 2025
28ee55a
remove inference routes from tsp
needuv Mar 12, 2025
c83b455
Additional changes to support SDK emitters (#33184)
dargilco Mar 13, 2025
3bde64e
update evaluations operations
needuv Mar 13, 2025
4200597
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
needuv Mar 13, 2025
dd26409
fix id being optional
needuv Mar 13, 2025
2d2713e
align to old naming
needuv Mar 13, 2025
423cfa7
Rename package and folder to azure-ai-projects-dp1 (#33195)
dargilco Mar 14, 2025
eba4829
add visibility param to key
needuv Mar 14, 2025
5afee09
Update ConnectionType enum (#33224)
dargilco Mar 17, 2025
7afc1fc
Remove Extraneous Fields from Connection and Deployment (#33245)
needuv Mar 17, 2025
94a064d
Dataset Review Feedback (#33252)
needuv Mar 19, 2025
72c43a5
Add service pattern templates for 1dp azure ai projects (#33235)
johanste Mar 19, 2025
18ae7d3
Change Name of Autoincrement API (#33353)
needuv Mar 21, 2025
224e34e
Incorporate Index Feedback (#33243)
needuv Mar 21, 2025
259fd62
Version-less Pending Upload API (#33399)
needuv Mar 21, 2025
8e92721
Rename folder and namespace from Agents to Assistants (#33452)
dargilco Mar 24, 2025
0358d69
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 25, 2025
7ef8a1b
Fix some of the build breaks due to new TypeSpec tools
dargilco Mar 25, 2025
7636ae6
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 25, 2025
38a557e
Fix error due to new tools: `error deprecated: Deprecated: Implicit m…
dargilco Mar 25, 2025
99c2ba2
Remove $ from query param, remove system data, align list/listLatest …
needuv Mar 25, 2025
0ff89ea
Fix formt after running `npx tsp format **\*.tsp`
dargilco Mar 26, 2025
44bd943
Bring over latest Agent typespec files from branch feature/azure-ai-p…
dargilco Mar 26, 2025
253f637
Remove all $ from query params (#33512)
needuv Mar 26, 2025
b54a5bf
Add API key auth via the header `Authorization: Bearer <key>` (#33516)
dargilco Mar 26, 2025
ee7434e
Change connectionName to name (#33534)
needuv Mar 27, 2025
c6f364f
Fix startPendingUploadAutoIncrement (#33525)
dargilco Mar 28, 2025
a42d770
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 28, 2025
8f4b306
Address some additional TypeSpec issues (#33566)
dargilco Mar 28, 2025
6aa7a83
Azure ai projects eval result asset (#33544)
kseager Mar 29, 2025
a2cf44d
[Eval Service Team] Red Team Cloud 1DP (#33287)
kseager Mar 29, 2025
a7ebee8
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 31, 2025
87ded34
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 31, 2025
fb20a8a
Remove credentials folder and fix some route names (#33587)
needuv Mar 31, 2025
59765e4
Create a separate TypeSpec project for Assistants (#33586)
dargilco Mar 31, 2025
146de83
Remove Azure.AI.Assistant TypeSpec from this branch
dargilco Mar 31, 2025
ec313e9
Add API Versions to Projects TypeSpec (#33631)
needuv Apr 1, 2025
b3f7bb6
Fix Spellcheck Gate for Projects TypeSpec (#33636)
needuv Apr 1, 2025
7d7d9c1
Set the api-version used by emitted SDKs (#33642)
dargilco Apr 2, 2025
7c15876
Fix output folder structure in emitted Python code
dargilco Apr 3, 2025
0e94eff
Fix startPendingUpload path for versioned API (#33710)
needuv Apr 3, 2025
942a952
Make sure this TypeSpec PR is green with regards to Python SDK emitte…
dargilco Apr 3, 2025
d88cedd
Fix C# SdkTspConfigValidation validation failures
dargilco Apr 4, 2025
64e1df4
remove eval result from public (#33729)
kseager Apr 4, 2025
34fb652
regenerate swagger (#33739)
needuv Apr 4, 2025
f5cc96a
Another round of updates to /connections, /datasets & /indexes operat…
dargilco Apr 10, 2025
124f9c4
Update swagger files
dargilco Apr 10, 2025
6808e70
Get download sas API (#33845)
andscho-msft Apr 10, 2025
158c805
updated swaggers (#33898)
needuv Apr 11, 2025
ee66023
Users/singankit/evaluation create return 201 (#33946)
singankit Apr 15, 2025
5281df4
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 16, 2025
cfbfe4a
Add connection operations with credentials (#33929)
dargilco Apr 16, 2025
ad7c697
Add PATCH for Asset Create/Update (#34021)
needuv Apr 17, 2025
fb7f51d
RedTeam Updates from implementation (#34023)
kseager Apr 21, 2025
b348cf3
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
dargilco Apr 21, 2025
d167b37
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 21, 2025
e18c2b3
Remove api-key auth (#34097)
dargilco Apr 22, 2025
3daea95
Remove Asset PUT (#34133)
needuv Apr 22, 2025
1826d5d
Update comment from `Assistants` to `Agents`, since we decided to use…
dargilco Apr 22, 2025
3cad6f7
API for create agent evaluation run (#34034)
YusakuNo1 Apr 22, 2025
85bc07f
Fix TypeSpec compile errors from previous commit
dargilco Apr 23, 2025
6c65932
Red-Team Target API Definition (#34144)
kseager Apr 23, 2025
18ac3fe
fix spell check gate (#34181)
needuv Apr 23, 2025
0f4d35b
Remove listing connections with credentials (#34148)
dargilco Apr 24, 2025
8e6db4e
Switch AppInsights connection string to be mandatory for SDKs and add…
YusakuNo1 Apr 24, 2025
ca3a9a1
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 25, 2025
0f04d88
Drop the 'onedp' name in emitted Python SDK package and folder
dargilco Apr 25, 2025
1de9b3d
Update swagger
dargilco Apr 25, 2025
88f1797
Auto fix to file red-teams/models.tsp after running `npx tsv .`
dargilco Apr 25, 2025
6e1b668
Add Type Filter to Deployment List (#34247)
needuv Apr 25, 2025
cffd345
Fix SdkTspConfigValidation issues (#34248)
dargilco Apr 25, 2025
fc0e897
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
dargilco Apr 25, 2025
a7c428f
Add examples and readme.md for Azure.AI.Projects (#34220)
needuv Apr 25, 2025
c4cc5cf
fix spell check (#34253)
needuv Apr 25, 2025
eddee22
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 25, 2025
791e17a
Fix Java language failure
dargilco Apr 25, 2025
12693f9
Rename latest api version to v1 (#34288)
needuv Apr 28, 2025
45d9ebe
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 28, 2025
8a44a2e
Users/singankit/update evaluation name (#34301)
singankit Apr 28, 2025
7169a24
Fix all Java, Go & Python issues in SdkTspConfigValidation when runni…
dargilco Apr 29, 2025
ae3b04f
Suppress JS emitter errors related to package and dir name missing th…
dargilco Apr 29, 2025
364bf26
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 29, 2025
1ada3b6
Address comments from SDK review meeting (#34273)
dargilco Apr 29, 2025
a1a907a
asset contract changes. (#34197)
adyada Apr 29, 2025
8bd4f87
Fix Dataset Swagger Validation (#34339)
needuv Apr 29, 2025
287eea2
Additional round of updates (#34333)
dargilco Apr 29, 2025
ef6f829
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 29, 2025
9f83acd
Add continuationToken decorator for dataset/index list (#34372)
needuv Apr 30, 2025
dfb5351
Update scope
dargilco May 1, 2025
cef2df3
Usesr/singankit/evaluation review feedback (#34427)
singankit May 2, 2025
6955430
Fix typo in doc string
dargilco May 3, 2025
e4c203f
Fix Swagger Avocado
dargilco May 3, 2025
8de48d8
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco May 3, 2025
57e9831
Add evaluation Id (#34391)
YusakuNo1 May 5, 2025
2ba3e2e
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco May 5, 2025
be01be1
Add missing connection id (#34434)
dargilco May 5, 2025
b12cfaa
[Red Team] clean-up contract details (#34444)
kseager May 5, 2025
11c4578
Make PATCH Content-Type Header application/merge-patch+json (#34449)
needuv May 5, 2025
6f9fde3
Remove List Query Parameters and Dataset Credentials Body (#34471)
needuv May 6, 2025
a5177ca
Add Index Field Mapping (#34476)
needuv May 6, 2025
04f19c9
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco May 7, 2025
0075ada
Remove pagination query params from the /connection list operation (#…
dargilco May 7, 2025
8c6ed71
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco May 8, 2025
101e4e0
Add optional connectionName to DatasetVersion (#34521)
dargilco May 8, 2025
07a63ad
Fix TypeSpec Validation and Address Minor Feedback (#34536)
needuv May 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions specification/ai/Azure.AI.Projects/client.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import "@azure-tools/typespec-client-generator-core";
import "./main.tsp";

using Azure.ClientGenerator.Core;

@@clientName(Azure.AI.Projects, "AIProjectClient");
148 changes: 148 additions & 0 deletions specification/ai/Azure.AI.Projects/common/models.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";

using TypeSpec.Http;

namespace Azure.AI.Projects;

@doc("The available sorting options when requesting a list of response objects.")
union ListSortOrder {
string,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other orders would you expect to add? And since this is an input only enum, I don't think making it extensible is needed...


@doc("Specifies an ascending sort order.")
ascending: "asc",

@doc("Specifies a descending sort order.")
descending: "desc",
}

@doc("List View Type Definition")
union ListViewType {
string,

@doc("List only active items.")
ActiveOnly: "ActiveOnly",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use PascalCase in the service API.


@doc("List only archived items.")
ArchivedOnly: "ArchivedOnly",

@doc("List all items.")
All: "All",
}

alias AssetBase = {
@doc("Asset stage")
@visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)
stage?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this truly a free-form string value that is also optional? What does it represent? The documentation is not very helpful.


@doc("A unique identifier for the asset, assetId probably?")
@visibility(Lifecycle.Read)
id?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would an asset not have an ID?


@doc("The name of the resource")
@visibility(Lifecycle.Read)
@key
name: string;

@doc("The version of the resource")
@visibility(Lifecycle.Read)
version: string;

@doc("The asset description text.")
@visibility(Lifecycle.Create, Lifecycle.Update)
description?: string;

@doc("Tag dictionary. Tags can be added, removed, and updated.")
@visibility(Lifecycle.Create, Lifecycle.Update)
tags?: Record<string>;
};

#suppress "@azure-tools/typespec-providerhub/no-inline-model" "Need to create responses correctly"
alias ResourceCreatedResponse<T extends TypeSpec.Reflection.Model> = TypeSpec.Http.Response<201> &
T;

#suppress "@azure-tools/typespec-providerhub/no-inline-model" "Need to create responses correctly"
alias OkResponse<T extends TypeSpec.Reflection.Model> = TypeSpec.Http.Response<200> &
T;

// Pending upload spec

// Define a URI alias for clarity.
alias Uri = string;

@doc("The type of pending upload.")
union PendingUploadType {
string,

@doc("No pending upload.")
none: "None",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use Pascal case in the API.


@doc("Temporary Blob Reference is the only supported type.")
temporaryBlobReference: "TemporaryBlobReference",
}

@doc("The type of credential used to access the storage account.")
union PendingUploadCredentialType {
string,

@doc("SAS credential type.")
sas: "SAS",
}

@doc("Represents a request for a pending upload.")
model PendingUploadRequest {
@doc("If PendingUploadId is not provided, a random GUID will be used.")
pendingUploadId?: string;

@doc("Name of Azure blob storage connection to use for generating temporary SAS token")
connectionName?: string;

@doc("TemporaryBlobReference is the only supported type.")
pendingUploadType: PendingUploadType.temporaryBlobReference;
}

@doc("Represents the response for a pending upload request")
model PendingUploadResponse {
@doc("Container-level read, write, list SAS.")
blobReferenceForConsumption: BlobReferenceForConsumption;

@doc("ID for this upload request.")
pendingUploadId: string;

@doc("Version of dataset to be created if user did not specify version when initially creating upload")
datasetVersion?: string;

@doc("TemporaryBlobReference is the only supported type")
pendingUploadType: PendingUploadType.temporaryBlobReference;
}

@doc("SAS Credential definition")
model SasCredential {
@doc("SAS uri")
@visibility(Lifecycle.Read)
sasUri: string;

@visibility(Lifecycle.Read)
@doc("Type of credential")
type: "SAS";
}

@doc("Represents a reference to a blob for consumption")
model BlobReferenceForConsumption {
@doc("Blob URI path for client to upload data. Example: https://blob.windows.core.net/Container/Path")
blobUri: Uri;

@doc("ARM ID of the storage account to use.")
storageAccountArmId: string;

@doc("Credential info to access the storage account.")
credential: SasCredential;
}

@doc("Represents a reference to a blob for consumption")
model AssetCredentialResponse {
@doc("Credential info to access the storage account.")
blobReferenceForConsumption: BlobReferenceForConsumption;
}
153 changes: 153 additions & 0 deletions specification/ai/Azure.AI.Projects/connections/models.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
import "@typespec/rest";
import "@azure-tools/typespec-autorest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@typespec/versioning";

using TypeSpec.Rest;
using TypeSpec.Versioning;

namespace Azure.AI.Projects;

@doc("Response from the list and get connections operations")
@resource("connections")
@added(Versions.v2025_05_01)
model Connection {
@doc("The name of the resource")
@visibility(Lifecycle.Read)
@key("name")
name: string;

@doc("Category of the connection")
@visibility(Lifecycle.Read)
type: ConnectionType;

@doc("The connection URL to be used for this service")
@visibility(Lifecycle.Read)
target: string;

@doc("Whether the connection is tagged as the default connection of its type")
@visibility(Lifecycle.Read)
isDefault: boolean;

@doc("The credentials used by the connection")
@visibility(Lifecycle.Read)
credentials: BaseCredentials;

@doc("Metadata of the connection")
@visibility(Lifecycle.Read)
metadata: Record<string>;
}

@doc("A base class for connection credentials")
@discriminator("type")
model BaseCredentials {
@doc("The type of credential used by the connection")
@visibility(Lifecycle.Read)
type: CredentialType;
}

@doc("API Key Credential definition")
model ApiKeyCredentials extends BaseCredentials {
@doc("The credentail type")
@visibility(Lifecycle.Read)
type: CredentialType.apiKey;

@doc("API Key")
@visibility(Lifecycle.Read)
@encodedName("application/json", "key")
apiKey?: string;
}

#suppress "@azure-tools/typespec-azure-core/casing-style"
@doc("Entra ID credential definition")
model EntraIDCredentials extends BaseCredentials {
@doc("The credential type")
@visibility(Lifecycle.Read)
type: CredentialType.entraId;
}

@doc("Custom credential defintion")
model CustomCredential extends BaseCredentials {
@doc("The credential type")
@visibility(Lifecycle.Read)
type: CredentialType.custom;

@doc("The credential type")
@visibility(Lifecycle.Read)
keys: Record<string>;
}

#suppress "@azure-tools/typespec-azure-core/casing-style"
@doc("Shared Access Signature (SAS) credential definition")
model SASCredentials extends BaseCredentials {
@doc("The credential type")
@visibility(Lifecycle.Read)
type: CredentialType.SAS;

@doc("SAS token")
@visibility(Lifecycle.Read)
@encodedName("application/json", "SAS")
sasToken?: string;
}

@doc("Credentials that do not require authentication")
model NoAuthenticationCredentials extends BaseCredentials {
@doc("The credential type ")
@visibility(Lifecycle.Read)
type: CredentialType.None;
}

// https://learn.microsoft.com/rest/api/azureml/workspace-connections/list-secrets?view=rest-azureml-2024-04-01&tabs=HTTP#ConnectionType
@doc("The Type (or category) of the connection")
union ConnectionType {
string,

@doc("Azure OpenAI Service")
AzureOpenAI: "AzureOpenAI", //TODO: In Python this results in .AZURE_OPEN_AI. How do I make it .AZURE_OPENAI?

@doc("Azure Blob Storage, with specified container")
AzureBlobStorage: "AzureBlob",

@doc("Azure Blob Storage, with container not specified (used by Agents)")
AzureStorageAccount: "AzureStorageAccount",

@doc("Azure AI Search")
AzureAISearch: "CognitiveSearch",

@doc("CosmosDB")
CosmosDB: "CosmosDB",

@doc("Generic connection that uses API Key authentication")
APIKey: "ApiKey",

@doc("Application Configuration")
ApplicationConfiguration: "AppConfig",

@doc("Application Insights")
ApplicationInsights: "AppInsights",

@doc("Custom Keys")
Custom: "CustomKeys",
}

@doc("The credential type used by the connection")
union CredentialType {
string,

@doc("API Key credential")
apiKey: "ApiKey",

@doc("Entra ID credential (formerly known as AAD)")
entraId: "AAD",

@doc("Shared Access Signature (SAS) credential")
SAS: "SAS",

@doc("Custom credential")
custom: "CustomKeys",

@doc("No credential")
None: "None",
}
50 changes: 50 additions & 0 deletions specification/ai/Azure.AI.Projects/connections/routes.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import "@typespec/rest";
import "@azure-tools/typespec-autorest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "./models.tsp";

using TypeSpec.Http;
using Azure.Core;
using Azure.Core.Traits;
using TypeSpec.Versioning;

namespace Azure.AI.Projects;

alias ConnectionServiceTraits = SupportsClientRequestId &
NoRepeatableRequests &
NoConditionalRequests;

alias ConnectionOperations = Azure.Core.ResourceOperations<ConnectionServiceTraits>;

@added(Versions.v2025_05_01)
interface Connections {
@doc("Get a connection by name, without populating connection credentials")
get is ConnectionOperations.ResourceRead<Connection>;

@doc("Get a connection by name, with its connection credentials")
@TypeSpec.Http.post
@Rest.actionSeparator("/")
@Rest.action("withCredentials")
getWithCredentials is ConnectionOperations.ResourceAction<
Connection,
{},
Connection
>;

@doc("List all connections in the project, without populating connection credentials")
list is ConnectionOperations.ResourceList<
Connection,
ListQueryParametersTrait<{
@doc("List connections of this specific type")
@query("connectionType")
connectionType?: ConnectionType;

@doc("List connections that are default connections")
@query("defaultConnection")
defaultConnection?: boolean;

...StandardListQueryParameters;
}>
>;
}
Loading
Loading