Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions specification/ai/Azure.AI.Projects/connections/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ namespace Azure.AI.Projects;
@discriminator("authType")
@added(Versions.v2025_05_01)
model Connection {

@doc("The name of the resource")
@visibility(Lifecycle.Read)
@key("name")
Expand Down Expand Up @@ -45,15 +44,13 @@ model Connection {
@doc("A base class for connection credentials")
@discriminator("authType")
model BaseCredentials {

@doc("The type of credential used by the connection")
@visibility(Lifecycle.Read)
authType: CredentialType;
}

@doc("API Key Credential definition")
model ApiKeyCredentials extends BaseCredentials {

@doc("The credentail type")
@visibility(Lifecycle.Read)
authType: CredentialType.apiKey;
Expand All @@ -66,15 +63,13 @@ model ApiKeyCredentials extends BaseCredentials {
#suppress "@azure-tools/typespec-azure-core/casing-style"
@doc("Entra ID credential definition")
model EntraIDCredentials extends BaseCredentials {

@doc("The credential type")
@visibility(Lifecycle.Read)
authType: CredentialType.entraId;
}

@doc("Custom credential defintion")
model CustomCredential extends BaseCredentials {

@doc("The credential type ")
@visibility(Lifecycle.Read)
authType: CredentialType.custom;
Expand All @@ -83,7 +78,6 @@ model CustomCredential extends BaseCredentials {
#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)
authType: CredentialType.SAS;
Expand All @@ -95,7 +89,6 @@ model SASCredentials extends BaseCredentials {

@doc("Credentials that do not require authentication")
model NoAuthenticationCredentials extends BaseCredentials {

@doc("The credential type ")
@visibility(Lifecycle.Read)
authType: CredentialType.None;
Expand Down
32 changes: 31 additions & 1 deletion specification/ai/Azure.AI.Projects/connections/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ interface Connections {
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.ResourceRead<Connection>;
getWithCredentials is ConnectionOperations.ResourceAction<
Connection,
{},
Connection
>;

@doc("List all connections in the project, without populating connection credentials")
list is ConnectionOperations.ResourceList<
Connection,
Expand All @@ -41,4 +47,28 @@ interface Connections {
...StandardListQueryParameters;
}>
>;

@doc("List all connections in the project, with their connection credentials")
@TypeSpec.Http.post
@Rest.actionSeparator("/")
@Rest.action("withCredentials")
listWithCredentials is ConnectionOperations.ResourceCollectionAction<
Connection,
{
@doc("List connections of this specific type")
@query("connectionType")
connectionType?: ConnectionType;

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

...StandardListQueryParameters;
},
Internal.ConnectionPaged
>;
}

namespace Internal {
model ConnectionPaged is Azure.Core.Page<Connection>;
}
1 change: 0 additions & 1 deletion specification/ai/Azure.AI.Projects/evaluations/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,4 @@ model Evaluation {

@doc("Evaluators to be used for the evaluation.")
evaluators: Record<EvaluatorConfiguration>;

}
5 changes: 4 additions & 1 deletion specification/ai/Azure.AI.Projects/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ namespace Azure.AI {
"Azure AI",
{
@doc("""
Project endpoint in the form of: https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name>
Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project"
if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form
"https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly
specify the Foundry Project name.
""")
endpoint: url,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"name": "endpoint",
"in": "path",
"description": "Project endpoint in the form of: https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name>",
"description": "Project endpoint. In the form \"https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project\"\nif your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form \n\"https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>\" if you want to explicitly\nspecify the Foundry Project name.",
"required": true,
"type": "string",
"format": "uri",
Expand Down Expand Up @@ -230,7 +230,7 @@
}
},
"/connections/{name}/withCredentials": {
"get": {
"post": {
"operationId": "Connections_GetWithCredentials",
"description": "Get a connection by name, with its connection credentials",
"parameters": [
Expand Down Expand Up @@ -277,6 +277,135 @@
}
}
},
"/connections/withCredentials": {
"post": {
"operationId": "Connections_ListWithCredentials",
"description": "List all connections in the project, with their connection credentials",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
},
{
"name": "connectionType",
"in": "query",
"description": "List connections of this specific type",
"required": false,
"type": "string",
"enum": [
"AzureOpenAI",
"AzureBlob",
"AzureStorageAccount",
"CognitiveSearch",
"CosmosDB",
"ApiKey",
"AppConfig",
"AppInsights",
"CustomKeys"
],
"x-ms-enum": {
"name": "ConnectionType",
"modelAsString": true,
"values": [
{
"name": "AzureOpenAI",
"value": "AzureOpenAI",
"description": "Azure OpenAI Service"
},
{
"name": "AzureBlobStorage",
"value": "AzureBlob",
"description": "Azure Blob Storage, with specified container"
},
{
"name": "AzureStorageAccount",
"value": "AzureStorageAccount",
"description": "Azure Blob Storage, with container not specified (used by Assistants)"
},
{
"name": "AzureAISearch",
"value": "CognitiveSearch",
"description": "Azure AI Search"
},
{
"name": "CosmosDB",
"value": "CosmosDB",
"description": "CosmosDB"
},
{
"name": "APIKey",
"value": "ApiKey",
"description": "Generic connection that uses API Key authentication"
},
{
"name": "ApplicationConfiguration",
"value": "AppConfig",
"description": "Application Configuration"
},
{
"name": "ApplicationInsights",
"value": "AppInsights",
"description": "Application Insights"
},
{
"name": "Custom",
"value": "CustomKeys",
"description": "Custom Keys"
}
]
}
},
{
"name": "defaultConnection",
"in": "query",
"description": "List connections that are default connections",
"required": false,
"type": "boolean"
},
{
"$ref": "#/parameters/Azure.Core.TopQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.SkipQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter"
},
{
"$ref": "#/parameters/Azure.Core.ClientRequestIdHeader"
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"$ref": "#/definitions/Internal.ConnectionPaged"
},
"headers": {
"x-ms-client-request-id": {
"type": "string",
"format": "uuid",
"description": "An opaque, globally-unique, client-generated string identifier for the request."
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/datasets": {
"get": {
"operationId": "Datasets_ListLatest",
Expand Down Expand Up @@ -2241,6 +2370,28 @@
],
"x-ms-discriminator-value": "dataset"
},
"Internal.ConnectionPaged": {
"type": "object",
"description": "Paged collection of Connection items",
"properties": {
"value": {
"type": "array",
"description": "The Connection items on this page",
"items": {
"$ref": "#/definitions/Connection"
},
"x-ms-identifiers": []
},
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
}
},
"required": [
"value"
]
},
"ListSortOrder": {
"type": "string",
"description": "The available sorting options when requesting a list of response objects.",
Expand Down
Loading
Loading