Skip To Content

Create Cloud Storage Connection File

Summary

Creates a connection file for ArcGIS-supported cloud storage. It allows existing raster geoprocessing tools to write cloud raster format (CRF) datasets into the cloud storage bucket or read raster datasets (not limited to CRF) stored in the cloud storage as input.

Usage

  • This tool requires you to provide the necessary information to make a cloud storage connection, such as Access Key, Secret Access Key, and Bucket Name.

  • The tool outputs a binary cloud storage connection file in ArcGIS Cloud Storage format (.icsd).

  • The raster dataset stored in the cloud storage can be referenced through a file path such as c:/temp/amazons3.acs/someraster.

  • Supported cloud storage providers include Amazon, Azure, Google, Aliyun, and Huawei.

  • If the dataset is stored in a folder in the bucket, the folder name must be included in the path, for example, c:/temp/amazons3.acs/foldername/someraster.

  • The tool will validate the credentials provided at run time. If the connection cannot be made, the tool will fail.

Syntax

CreateCloudStorageConnectionFile_management (out_folder_path, out_name, service_provider, bucket_name, {access_key_id}, {secret_access_key}, {region}, {end_point}, {config_options})
ParameterExplanationData Type
out_folder_path

The folder path where the connection file will be created.

Folder
out_name

The name of the cloud storage connection file.

String
service_provider

Specifies the cloud storage service provider.

  • AZUREMicrosoft Azure
  • AMAZONAmazon S3
  • GOOGLEGoogle Cloud Storage
  • ALIYUNAlibaba Cloud Storage
  • HUAWEIHuawei Cloud Storage
String
bucket_name

The name of the cloud storage container where the raster dataset will be stored. For many cloud providers, it is also called a bucket.

String
access_key_id
(Optional)

The access key ID string for the specific cloud storage type. It can also be the account name as is the case with Azure.

String
secret_access_key
(Optional)

The secret access key string to authenticate the connection to cloud storage.

Encrypted String
region
(Optional)

The region string for the cloud storage. If provided, the value must use the format defined by the cloud storage choice. The default is the selected cloud provider's account default.

String
end_point
(Optional)

The service endpoint (uris) of the cloud storage, such as oss-us-west-1.aliyuncs.com. If the parameter is not provided, the default endpoint for the selected cloud storage type will be used. The CNAME redirected endpoint can be used if needed.

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

Specifies configuration options pertaining to the specific type of cloud service. Some services offer options, some do not. You only need to set the option if you want to turn them on.

Value Table

Code sample

CreateCloudStorageConnectionFile example 1 (Python window)

This is a Python sample for the CreateCloudStorageConnectionFile tool.

#====================================
# CreateCloudStorageConnectionFile
# Usage:
# arcpy.management.CreateCloudStorageConnection(
#     out_folder_path, out_name, AZURE | AMAZON | GOOGLE | ALIYUN | HUAWEI, bucket_name,
#     {access_key_id}, {secret_access_key}, {region}, {end_point},
#     { {Name} {Value}; {Name} {Value}...})
# arcpy.management.CreateCloudStorageConnection(
#     out_folder_path, out_name, AZURE | AMAZON | GOOGLE | ALIYUN | HUAWEI, bucket_name,
#     {access_key_id}, {secret_access_key}, {region}, {end_point},
#     {config_options})

import arcpy

# Create connection to open public bucket with requester pay option
arcpy.management.CreateCloudStorageConnection(
    "C:/Workspace/connections", "awss3storage.acs", "AMAZON", "publicrasterstore",
    config_options="AWS_REQUESTER_PAYS requester")

# Create connection to secured Azure bucket
arcpy.management.CreateCloudStorageConnection(
    "C:/Workspace/connections", "azurestorage.acs", "AZURE", "rasterstore", "imageaccount",
    "NOGEOU1238987OUOUNOQEWQWEIO")

# Create AliYUN connection with end points
arcpy.management.CreateCloudStorageConnection(
    "C:/Workspace/connections", "aliyun.acs", "ALIYUN", "rasterstore", "AYOUER9273PJJNY",
"NOGEOU1238987OUOUNOQEWQWEIO", end_point="rasterstore.oss-us-west-1.aliyuncs.com")
CreateCloudStorageConnectionFile example 2 (stand-alone script)

This is a Python sample for the CreateCloudStorageConnectionFile tool.

#====================================
# CreateCloudStorageConnectionFile
# Usage:
# arcpy.management.CreateCloudStorageConnection(
#     out_folder_path, out_name, AZURE | AMAZON | GOOGLE | ALIYUN | HUAWEI, bucket_name,
#     {access_key_id}, {secret_access_key}, {region}, {end_point},
#     { {Name} {Value}; {Name} {Value}...})
# arcpy.management.CreateCloudStorageConnection(
#     out_folder_path, out_name, AZURE | AMAZON | GOOGLE | ALIYUN | HUAWEI, bucket_name,
#     {access_key_id}, {secret_access_key}, {region}, {end_point},
#     {config_options})

import arcpy

outfolder = "C:/Workspace/connections"
connectname = "googlecloudos.acs"
provider = "GOOGLE"
accesskey = "AYOUER9273PJJNY"
secretkey = "NOGEOU1238987OUOUNOQEWQWEIO"
bucketname = "rasterstore"

# Create connection to Google cloud object storage
arcpy.management.CreateCloudStorageConnection(
outfolder, connectname, provider, bucketname, accesskey, secretkey)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics