Create AI Service Connection File (Data Management)

Summary

Creates a connection file for hosted AI services in ArcGIS Pro.

Usage

  • This tool eliminates the need to manually enter access credentials and configuration settings each time you interact with AI services. This ensures a faster, more secure connection process while reducing the risk of configuration errors.

    This tool saves connection details in an encoded format, ensuring that sensitive information is handled securely.

  • You must provide a folder location and specify a file name for the connection file, which will be saved in the AIS format.

  • The tool supports multiple cloud-based AI service providers.

  • The saved connection file can be reused among various tasks, reducing the need for repeated authentication.

Parameters

LabelExplanationData Type
Connection File Location

The folder path where the connection file will be created.

Folder
Connection File Name

The name of the AI service connection file.

String
Service Provider
(Optional)

Specifies the cloud service provider that will be used.

  • AWS—The cloud service provider will be Amazon Web Services (AWS). AWS offers a comprehensive suite of cloud-based machine learning and AI services, enabling scalable AI model deployment and data processing.
  • Anthropic—The cloud service provider will be Anthropic. Anthropic specializes in developing AI systems with a focus on safety and alignment, delivering current, ethical AI models.
  • Azure—The cloud service provider will be Microsoft Azure. Microsoft Azure provides cloud-based AI tools and services, including pretrained models and customized AI solutions for businesses.
  • Hugging Face—The cloud service provider will be Hugging Face. Hugging Face offers an extensive library of pretrained machine learning models and AI solutions, focusing on natural language processing.
  • OpenAI—The cloud service provider will be OpenAI. OpenAI provides advanced AI models for a variety of applications, such as text generation and image creation.
  • Google—The cloud service provider will be Google Cloud AI. Google Cloud AI offers a wide range of AI and machine learning services, including TensorFlow, pretrained models, and customizable solutions for various industries.
  • Others—This category includes additional cloud service providers offering specialized AI models and services for various domains.

String
Connection Parameters
(Optional)

The connection parameters that will be added to the output connection file. The keys and values are unique for each service provider.

  • Key—The name of the connection parameter key.
  • Value—The value of the connection parameter key.

Value Table
Secret Parameter Key
(Optional)

The key whose value contains sensitive information, such as API keys or authentication tokens.

String
Secret Parameter Value
(Optional)

The secret access key string to authenticate the connection.

Caution:

This is sensitive information and should only be shared with trusted service providers. The key provided is stored in the Windows Credential Manager, and the corresponding service name (GUID) is saved in the output file.

String Hidden

Derived Output

LabelExplanationData Type
Out Connection File

The path to the output connection file.

File

arcpy.management.CreateAIServiceConnectionFile(out_folder_path, out_name, {service_provider}, {connection_parameters}, {secret_param_key}, {secret_param_value})
NameExplanationData Type
out_folder_path

The folder path where the connection file will be created.

Folder
out_name

The name of the AI service connection file.

String
service_provider
(Optional)

Specifies the cloud service provider that will be used.

  • AWS—The cloud service provider will be Amazon Web Services (AWS). AWS offers a comprehensive suite of cloud-based machine learning and AI services, enabling scalable AI model deployment and data processing.
  • Anthropic—The cloud service provider will be Anthropic. Anthropic specializes in developing AI systems with a focus on safety and alignment, delivering current, ethical AI models.
  • Azure—The cloud service provider will be Microsoft Azure. Microsoft Azure provides cloud-based AI tools and services, including pretrained models and customized AI solutions for businesses.
  • Hugging Face—The cloud service provider will be Hugging Face. Hugging Face offers an extensive library of pretrained machine learning models and AI solutions, focusing on natural language processing.
  • OpenAI—The cloud service provider will be OpenAI. OpenAI provides advanced AI models for a variety of applications, such as text generation and image creation.
  • Google—The cloud service provider will be Google Cloud AI. Google Cloud AI offers a wide range of AI and machine learning services, including TensorFlow, pretrained models, and customizable solutions for various industries.
  • Others—This category includes additional cloud service providers offering specialized AI models and services for various domains.

String
connection_parameters
[connection_parameters,...]
(Optional)

The connection parameters that will be added to the output connection file. The keys and values are unique for each service provider.

  • Key—The name of the connection parameter key.
  • Value—The value of the connection parameter key.

Value Table
secret_param_key
(Optional)

The key whose value contains sensitive information, such as API keys or authentication tokens.

String
secret_param_value
(Optional)

The secret access key string to authenticate the connection.

Caution:

This is sensitive information and should only be shared with trusted service providers. The key provided is stored in the Windows Credential Manager, and the corresponding service name (GUID) is saved in the output file.

String Hidden

Derived Output

NameExplanationData Type
out_connection_file

The path to the output connection file.

File

Code sample

CreateAIServiceConnectionFile (stand-alone script)

The following example demonstrates how to use the CreateAIServiceConnectionFile function.

# Name: CreateAIServiceConnection.py
# Description: This tool generates and stores secure connection files for accessing hosted AI services.
#
# Requirements: ArcGIS Pro Basic license

# Import system modules
import arcpy

# Set local variables
out_folder_path = r""
out_name = "ConnectionFile.ais"
service_provider = "Others"
connection_parameters = ""
secret_param_key = ""
secret_param_value = ""

# Run Create AI Service Connection File
arcpy.management.CreateAIServiceConnection(
    out_folder_path=out_folder_path, out_name=out_name,
    service_provider=service_provider,
    connection_parameters=connection_parameters,
    secret_param_key=secret_param_key,
    secret_param_value=secret_param_value
)

Environments

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: No

Related topics