Create Cloud Storage Connection File (Data Management)

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, and Alibaba.

  • 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.

  • You can use this tool with an Amazon Web Services (AWS) Identity and Access Management (IAM) role. To do so, leave the Access Key ID and Secret Access Key parameters blank. If the IAM role is properly configured when running this tool on an EC2 machine, a successful connection will occur. Now the connection file created can be used in the same environment.

Syntax

CreateCloudStorageConnectionFile(out_folder_path, out_name, service_provider, bucket_name, {access_key_id}, {secret_access_key}, {region}, {end_point}, {config_options}, {folder})
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
  • ALIBABAAlibaba Cloud Storage
  • WEBHDFSWebHDFS
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
folder
(Optional)

Specify a folder in the cloud storage Bucket (Container) Name where the raster dataset will be stored.

Folder

Derived Output

NameExplanationData Type
out_connection

The output cloud storage connection file path.

File

Code sample

CreateCloudStorageConnectionFile example 1 (Python window)

This is a Python sample for the CreateCloudStorageConnectionFile tool.

#====================================
# CreateCloudStorageConnectionFile
# Usage:
# arcpy.management.CreateCloudStorageConnectionFile(
#     out_folder_path, out_name, AZURE | AMAZON | GOOGLE | ALIBABA, bucket_name,
#     {access_key_id}, {secret_access_key}, {region}, {end_point},
#     { {Name} {Value}; {Name} {Value}...})
# arcpy.management.CreateCloudStorageConnectionFile(
#     out_folder_path, out_name, AZURE | AMAZON | GOOGLE | ALIBABA, 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.CreateCloudStorageConnectionFile(
    "C:/Workspace/connections", "awss3storage.acs", "AMAZON", "publicrasterstore",
    config_options="AWS_REQUESTER_PAYS requester")

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

# Create Alibaba connection with end points
arcpy.management.CreateCloudStorageConnectionFile(
    "C:/Workspace/connections", "aliyun.acs", "ALIBABA", "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.CreateCloudStorageConnectionFile(
#     out_folder_path, out_name, AZURE | AMAZON | GOOGLE | ALIBABA, bucket_name,
#     {access_key_id}, {secret_access_key}, {region}, {end_point},
#     { {Name} {Value}; {Name} {Value}...})
# arcpy.management.CreateCloudStorageConnectionFile(
#     out_folder_path, out_name, AZURE | AMAZON | GOOGLE | ALIBABA, 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.CreateCloudStorageConnectionFile(
outfolder, connectname, provider, bucketname, accesskey, secretkey)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics