Skip to content

update the model to DeploymentResourceJobState #34645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1237,24 +1237,13 @@ model TextAnalysisAuthoringUnassignDeploymentResourcesOptions {
}

/**
* Represents the state of a assign deployment resources job.
* Represents the state of a deployment resources job.
*/
@added(Versions.v2023_04_15_preview)
@clientName("TextAuthoringAssignDeploymentResourcesState", "csharp")
@clientName("TextAuthoringDeploymentResourcesState", "csharp")
@resource("resources/assign/jobs")
@parentResource(TextAnalysisAuthoringProjectMetadata)
model TextAnalysisAuthoringAssignDeploymentResourcesJobState {
...TextAnalysisAuthoringJobState;
}

/**
* Represents the state of a unassign deployment resources job.
*/
@added(Versions.v2023_04_15_preview)
@clientName("TextAuthoringUnassignDeploymentResourcesState", "csharp")
@resource("resources/unassign/jobs")
@parentResource(TextAnalysisAuthoringProjectMetadata)
model TextAnalysisAuthoringUnassignDeploymentResourcesJobState {
model TextAnalysisAuthoringDeploymentResourcesJobState {
...TextAnalysisAuthoringJobState;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,28 @@ interface TextAuthoringProject {
/**
* Gets the status of an existing unassign deployment resources job.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
@route("/authoring/analyze-text/projects/{projectName}/resources/unassign/jobs/{jobId}")
@get
@added(Versions.v2023_04_15_preview)
getUnassignDeploymentResourcesStatus is languageOperations.ResourceRead<TextAnalysisAuthoringUnassignDeploymentResourcesJobState>;
getUnassignDeploymentResourcesStatus is Azure.Core.Foundations.Operation<
{
/**
* The new project name.
*/
@path
projectName: string;

/**
* The job ID.
*/
@path
jobId: string;
},
TextAnalysisAuthoringDeploymentResourcesJobState,
{},
Foundations.ErrorResponse
>;

/**
* Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory
Expand Down Expand Up @@ -427,7 +447,7 @@ interface TextAuthoringProject {
* Gets the status of an existing assign deployment resources job.
*/
@added(Versions.v2023_04_15_preview)
getAssignDeploymentResourcesStatus is languageOperations.ResourceRead<TextAnalysisAuthoringAssignDeploymentResourcesJobState>;
getAssignDeploymentResourcesStatus is languageOperations.ResourceRead<TextAnalysisAuthoringDeploymentResourcesJobState>;

/**
* Swaps two existing deployments with each other.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@
"200": {
"description": "The request has succeeded.",
"schema": {
"$ref": "#/definitions/TextAnalysisAuthoringAssignDeploymentResourcesJobState"
"$ref": "#/definitions/TextAnalysisAuthoringDeploymentResourcesJobState"
}
},
"default": {
Expand Down Expand Up @@ -2295,7 +2295,7 @@
"200": {
"description": "The request has succeeded.",
"schema": {
"$ref": "#/definitions/TextAnalysisAuthoringUnassignDeploymentResourcesJobState"
"$ref": "#/definitions/TextAnalysisAuthoringDeploymentResourcesJobState"
}
},
"default": {
Expand Down Expand Up @@ -3197,58 +3197,6 @@
]
}
},
"TextAnalysisAuthoringAssignDeploymentResourcesJobState": {
"type": "object",
"description": "Represents the state of a assign deployment resources job.",
"properties": {
"jobId": {
"type": "string",
"description": "The job ID.",
"readOnly": true
},
"createdDateTime": {
"type": "string",
"format": "date-time",
"description": "The creation date time of the job."
},
"lastUpdatedDateTime": {
"type": "string",
"format": "date-time",
"description": "The last date time the job was updated."
},
"expirationDateTime": {
"type": "string",
"format": "date-time",
"description": "The expiration date time of the job."
},
"status": {
"$ref": "#/definitions/JobStatus",
"description": "The job status."
},
"warnings": {
"type": "array",
"description": "The warnings that were encountered while executing the job.",
"items": {
"$ref": "#/definitions/Azure.Core.Foundations.Error"
},
"x-ms-identifiers": []
},
"errors": {
"type": "array",
"description": "The errors encountered while executing the job.",
"items": {
"$ref": "#/definitions/Azure.Core.Foundations.Error"
},
"x-ms-identifiers": []
}
},
"required": [
"jobId",
"createdDateTime",
"lastUpdatedDateTime",
"status"
]
},
"TextAnalysisAuthoringAssignDeploymentResourcesOptions": {
"type": "object",
"description": "Represents the options for assigning Azure resources to a project.",
Expand Down Expand Up @@ -3856,6 +3804,58 @@
"region"
]
},
"TextAnalysisAuthoringDeploymentResourcesJobState": {
"type": "object",
"description": "Represents the state of a deployment resources job.",
"properties": {
"jobId": {
"type": "string",
"description": "The job ID.",
"readOnly": true
},
"createdDateTime": {
"type": "string",
"format": "date-time",
"description": "The creation date time of the job."
},
"lastUpdatedDateTime": {
"type": "string",
"format": "date-time",
"description": "The last date time the job was updated."
},
"expirationDateTime": {
"type": "string",
"format": "date-time",
"description": "The expiration date time of the job."
},
"status": {
"$ref": "#/definitions/JobStatus",
"description": "The job status."
},
"warnings": {
"type": "array",
"description": "The warnings that were encountered while executing the job.",
"items": {
"$ref": "#/definitions/Azure.Core.Foundations.Error"
},
"x-ms-identifiers": []
},
"errors": {
"type": "array",
"description": "The errors encountered while executing the job.",
"items": {
"$ref": "#/definitions/Azure.Core.Foundations.Error"
},
"x-ms-identifiers": []
}
},
"required": [
"jobId",
"createdDateTime",
"lastUpdatedDateTime",
"status"
]
},
"TextAnalysisAuthoringDocumentEntityLabelEvaluationResult": {
"type": "object",
"description": "Represents an evaluation result entity label.",
Expand Down Expand Up @@ -6011,58 +6011,6 @@
"result"
]
},
"TextAnalysisAuthoringUnassignDeploymentResourcesJobState": {
"type": "object",
"description": "Represents the state of a unassign deployment resources job.",
"properties": {
"jobId": {
"type": "string",
"description": "The job ID.",
"readOnly": true
},
"createdDateTime": {
"type": "string",
"format": "date-time",
"description": "The creation date time of the job."
},
"lastUpdatedDateTime": {
"type": "string",
"format": "date-time",
"description": "The last date time the job was updated."
},
"expirationDateTime": {
"type": "string",
"format": "date-time",
"description": "The expiration date time of the job."
},
"status": {
"$ref": "#/definitions/JobStatus",
"description": "The job status."
},
"warnings": {
"type": "array",
"description": "The warnings that were encountered while executing the job.",
"items": {
"$ref": "#/definitions/Azure.Core.Foundations.Error"
},
"x-ms-identifiers": []
},
"errors": {
"type": "array",
"description": "The errors encountered while executing the job.",
"items": {
"$ref": "#/definitions/Azure.Core.Foundations.Error"
},
"x-ms-identifiers": []
}
},
"required": [
"jobId",
"createdDateTime",
"lastUpdatedDateTime",
"status"
]
},
"TextAnalysisAuthoringUnassignDeploymentResourcesOptions": {
"type": "object",
"description": "Represents the options to unassign Azure resources from a project.",
Expand Down
Loading
Loading