The addRegion action allows for the addition or replacement of custom region definitions for the S3 (Simple Storage Service) environment within SAS Viya. This is particularly useful for connecting to S3-compatible storage that is not hosted on AWS or for defining custom endpoints. By specifying parameters such as the host, port, and SSL settings, administrators can configure how CAS interacts with various S3 storage providers.
| Parameter | Description |
|---|---|
| host | Specifies the server hostname or IP address that CAS connects to for the S3 service. |
| name | Specifies a unique name for the region being added or replaced. This name is used to reference the configuration. |
| nossl | When set to TRUE, specifies that SSL or TLS is disabled for the data transfer. The default is FALSE. |
| port | Specifies the HTTP port to connect to when not using SSL. If not specified, the default S3 port is used. |
| region | Specifies the region code (e.g., 'us-east-1') for the region being added or replaced. |
| sslallowed | Specifies that SSL is permitted when communicating with the S3 environment. This is ignored if sslrequired is set to TRUE. Default is TRUE. |
| sslport | Specifies the HTTPS port to connect to S3 with SSL. If not specified, the default SSL port is used. |
| sslrequired | When set to TRUE, specifies that all communications with the S3 environment must use SSL. Default is TRUE. |
The `s3.addRegion` action does not operate on CAS tables. It is a server-side administrative action used to configure S3 connectivity. Therefore, no data needs to be loaded into CAS to use this action.
| 1 | /* No |
| 2 | data creation is necessary for this action. */ |
This example demonstrates how to add a custom S3 region for a local MinIO server, which is a popular S3-compatible object storage.
| 1 | PROC CAS; |
| 2 | S3.addRegion / |
| 3 | name='minio-local' |
| 4 | host='192.168.1.100' |
| 5 | region='us-east-1' |
| 6 | port=9000 |
| 7 | nossl=true; |
| 8 | RUN; |
This example shows how to add a new region for a secure, S3-compatible storage provider, requiring SSL. After adding the region, the `s3.listRegions` action is used to verify that the new region has been successfully configured.
| 1 | PROC CAS; |
| 2 | S3.addRegion / |
| 3 | name='secure-storage' |
| 4 | host='s3.custom-provider.com' |
| 5 | region='eu-central-1' |
| 6 | sslrequired=true |
| 7 | sslport=9001; |
| 8 | RUN; |
| 9 | |
| 10 | S3.listRegions; |
| 11 | RUN; |
If a region with the same name already exists, the `addRegion` action will replace its configuration. This example updates the host for the 'minio-local' region defined previously.
| 1 | PROC CAS; |
| 2 | S3.addRegion / |
| 3 | name='minio-local' |
| 4 | host='minio.new-domain.com' |
| 5 | region='us-east-1' |
| 6 | port=9000 |
| 7 | nossl=true; |
| 8 | RUN; |
| 9 | |
| 10 | S3.listRegions RESULT=r; |
| 11 | PRINT r; |
| 12 | RUN; |
A retail company is setting up a hybrid cloud environment. They want to use their on-premise MinIO object storage for staging raw sales data before processing it in SAS Viya. Th...
A financial services firm is migrating its sensitive data from one secure, S3-compatible cloud provider to another due to new compliance requirements. The test involves adding t...
A junior administrator is attempting to configure a new S3 region but is unsure about the security parameters. This scenario tests the action's robustness and error handling whe...