After you create an app you must deploy the app to be able to stream and analyze data.
Deploy an application
After you have built an end-to-end application with all the necessary components, you must deploy the app to start using it.
Console
Open the Applications tab of the Vertex AI Vision dashboard.
Select View app next to the name of your application from the list.
From the application graph builder page click the Deploy button.
In the Deploy application menu that opens, select any options and click Deploy.
After deployment completes there will be green check marks next to the nodes.
REST & CMD LINE
To deploy your application for use, send a POST request using the projects.locations.applications.deploy method.
Before using any of the request data, make the following replacements:
- PROJECT: Your Google Cloud project ID or project number.
- LOCATION_ID: The region where you are using
Vertex AI Vision. For example:
us-central1
,europe-west4
. See available regions. - APPLICATION_ID: The ID of your target application.
HTTP method and URL:
POST https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/applications/APPLICATION_ID:deploy
To send your request, choose one of these options:
curl
Execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/applications/APPLICATION_ID:deploy"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/applications/APPLICATION_ID:deploy" | Select-Object -Expand Content
{ "name": "projects/PROJECT_ID/locations/LOCATION_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.visionai.v1.OperationMetadata", "createTime": "YYYY-MM-DDTHH:MM:SS.454506987Z", "target": "projects/PROJECT_ID/locations/LOCATION_ID/applications/APPLICATION_ID", "verb": "update", "requestedCancellation": false, "apiVersion": "v1" }, "done": false }
Get operation status
Use the operation ID in the response to get the status of the deploy request.
Before using any of the request data, make the following replacements:
- REGIONALIZED_ENDPOINT: Endpoint might include a prefix matching the
LOCATION_ID
such aseurope-west4-
. See more about regionalized endpoints. - PROJECT_NUMBER: Your Google Cloud project number.
- LOCATION_ID: The region where you are using
Vertex AI Vision. For example:
us-central1
,europe-west4
. See available regions. - OPERATION_ID: The operation ID that is returned when you start a long-running
operation. For example:
- projects/123456/locations/us-central1/[...]/operations/OPERATION_ID
HTTP method and URL:
GET https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
Undeploy an application
To stop using an app, you must undeploy the application.
Console
Open the Applications tab of the Vertex AI Vision dashboard.
Select View app next to the name of your application from the list.
From the application graph builder page click the Deactivate button.
REST & CMD LINE
To undeploy your application, send a POST request using the projects.locations.applications.undeploy method.
Before using any of the request data, make the following replacements:
- PROJECT: Your Google Cloud project ID or project number.
- LOCATION_ID: The region where you are using
Vertex AI Vision. For example:
us-central1
,europe-west4
. See available regions. - APPLICATION_ID: The ID of your target application.
HTTP method and URL:
POST https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/applications/APPLICATION_ID:undeploy
To send your request, choose one of these options:
curl
Execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/applications/APPLICATION_ID:undeploy"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/applications/APPLICATION_ID:undeploy" | Select-Object -Expand Content
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.visionai.v1.OperationMetadata", "createTime": "2023-01-12T18:14:48.260296926Z", "target": "projects/PROJECT_NUMBER/locations/LOCATION_ID/applications/APPLICATION_NAME", "verb": "update", "requestedCancellation": false, "apiVersion": "v1" }, "done": false }
Get operation status
Use the operation ID in the response to get the status of the undeploy request.
Before using any of the request data, make the following replacements:
- REGIONALIZED_ENDPOINT: Endpoint might include a prefix matching the
LOCATION_ID
such aseurope-west4-
. See more about regionalized endpoints. - PROJECT_NUMBER: Your Google Cloud project number.
- LOCATION_ID: The region where you are using
Vertex AI Vision. For example:
us-central1
,europe-west4
. See available regions. - OPERATION_ID: The operation ID that is returned when you start a long-running
operation. For example:
- projects/123456/locations/us-central1/[...]/operations/OPERATION_ID
HTTP method and URL:
GET https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
What's next
- Read instructions about how to begin data ingestion from an app's input stream in Create and manage streams.
- Learn how to list apps and view a deployed app's instances in Managing applications.
- Learn how to read app input data from an ingestion stream or analyzed model output data in Read stream data.