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
You must provide the necessary information to make a cloud storage connection—such as Access Key, Secret Access Key, and Bucket Name—to run this tool.
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.
This tool supports connections to Amazon Simple Storage Solution (S3) buckets, Microsoft Azure Blob storage containers, Alibaba Cloud Object Cloud Storage Service buckets, and Google Cloud Storage.
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.
To use this tool with an Amazon Web Services (AWS) Identity and Access Management (IAM) role, 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. Then the connection file created can be used in the same environment.
Syntax
arcpy.management.CreateCloudStorageConnectionFile(out_folder_path, out_name, service_provider, bucket_name, {access_key_id}, {secret_access_key}, {region}, {end_point}, {config_options}, {folder})
Parameter | Explanation | Data 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.
| String |
bucket_name | The name of the cloud storage container where the raster dataset will be stored. Many cloud providers also call it 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 a value is not provided, the default endpoint for the selected cloud storage type will be used. The CNAME redirected endpoint can also be used if needed. | String |
config_options [config_options,...] (Optional) | The 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) | The folder in the Bucket (Container) Name parameter where the raster dataset will be stored. | String |
Derived Output
Name | Explanation | Data Type |
out_connection | The output cloud storage connection file path. | File |
Code sample
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")
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
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes