You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Multi-region access points (MRAP)
Using multi-region access points
Copy page
Download PDF
Using multi-region access points
This topic explains how to use multi-region access points.​
Permissions required​
Before using a multi-region access point, make sure your account is authorized to operate on the associated buckets. Otherwise, your requests will fail due to insufficient permissions. You can grant your account the necessary permissions via bucket or Identity and Access Management (IAM) policies. For more information, see Bucket policy overview and IAM policy overview.​
Alias​
Once a multi-region access point is created, TOS automatically generates an alias. This alias is always unique and cannot be modified. Accessing a bucket typically requires including the bucket name in the request. However, when accessing a bucket through a multi-region access point, you do not need to specify the bucket name. Instead, specify the access point alias. TOS will then route the request to the resource through the alias.​
The alias is used to construct domain names for a multi-region access point (MRAP). You can access the underlying buckets using these domain names, which follow these formats:​
  • MRAP domain names for TOS protocol: <alias>.mrap.accesspoint.tos-global.volces.com​
  • MRAP domain names for S3 protocol: <alias>.mrap.accesspoint.tos-s3-global.volces.com​
Supported operations​
Not all operations are supported when you access TOS through an MRAP domain name. For more information, see API operations supported by multi-region access points.​
Notes​
​
Category​
Considerations​
Domain names​
MRAP domain names are automatically generated by TOS and cannot be edited or reused.​
Access methods​
You can only access a bucket via a MRAP domain name from the private network. Access from the public network is not supported.​
Bandwidth​
The bandwidth limit per account when you access buckets via a MRAP domain name is as follows:​
  • Non-cross-border access: 10 Gbps​
  • Cross-border access: 2 Gbps​
tip​
Submit a ticket if you need more bandwidth.​
Restrictions​
  • Currently, multi-region access points only support the following regions: China (Beijing), China (Guangzhou), China (Shanghai), China (Hong Kong), and Asia Pacific (Johor).​
  • Multi-region access points do not support anonymous requests.​
  • Multi-region access points do not support IPv6.​
​
Steps​
  1. Obtain a domain name for a multi-region access point.​
  1. Log in to the TOS console.​
  1. In the left navigation pane, select Access point > Multi-Region Access Points.​
  1. On the Multi-Region Access Points page, click the multi-region access point you want to manage.​
  1. On the Overview tab, locate the Alias for the access point in the Basic information section. Then, find the TOS Endpoint in the Domain name section.​
  1. Use the multi-region access point.​
  • Use the multi-region access point via API​
  • To use the multi-region access point when accessing TOS via API, replace the Host in the request with <alias>.<TOS Endpoint>. The following example uses the GetObject operation to illustrate this process. For more information, see API overview.​
  • ​
    GET /objectName HTTP/1.1​
    Host: mc3fe2523****.mrap.accesspoint.tos-global.volces.com​
    Date: Fri, 30 Jul 2021 08:05:36 GMT​
    Authorization: authorization string​
    ​
  • Use the multi-region access point via SDK​
  • To use the multi-region access point when accessing TOS via SDK, replace the endpoint with the TOS Endpoint from Step 1 and the bucketName with the Alias from Step 1. The following example shows how to upload a local file using Go SDK. For more information, see SDK overview.​
  • ​
    package main​
    ​
    import (​
    "context"​
    "fmt"​
    ​
    "github.com/volcengine/ve-tos-golang-sdk/v2/tos"​
    )​
    ​
    func checkErr(err error) {​
    if err != nil {​
    if serverErr, ok := err.(*tos.TosServerError); ok {​
    fmt.Println("Error:", serverErr.Error())​
    fmt.Println("Request ID:", serverErr.RequestID)​
    fmt.Println("Response Status Code:", serverErr.StatusCode)​
    fmt.Println("Response Header:", serverErr.Header)​
    fmt.Println("Response Err Code:", serverErr.Code)​
    fmt.Println("Response Err Msg:", serverErr.Message)​
    } else if clientErr, ok := err.(*tos.TosClientError); ok {​
    fmt.Println("Error:", clientErr.Error())​
    fmt.Println("Client Cause Err:", clientErr.Cause.Error())​
    } else {​
    fmt.Println("Error:", err)​
    }​
    panic(err)​
    }​
    }​
    ​
    func main() {​
    var (​
    accessKey = os.Getenv("TOS_ACCESS_KEY")​
    secretKey = os.Getenv("TOS_SECRET_KEY")​
    endpoint = "https://mrap.accesspoint.tos-global.volces.com"​
    region = "cn-beijing"​
    // Enter the alias​
    bucketName = "mc3fe2523****"​
    ​
    // Upload the file as example.txt to the example_dir directory​
    objectKey = "example_dir/example.txt"​
    ctx = context.Background()​
    )​
    // Initialize the client​
    client, err := tos.NewClientV2(endpoint, tos.WithRegion(region), tos.WithCredentials(tos.NewStaticCredentials(accessKey, secretKey)))​
    checkErr(err)​
    // Use the file path to upload the file​
    output, err := client.PutObjectFromFile(ctx, &tos.PutObjectFromFileInput{​
    PutObjectBasicInput: tos.PutObjectBasicInput{​
    Bucket: bucketName,​
    Key: objectKey,​
    },​
    FilePath: "./example.txt",​
    })​
    checkErr(err)​
    fmt.Println("PutObjectV2 Request ID:", output.RequestID)​
    }​
    ​
Related operations​
CloudTrail is a Volcano Engine service that allows you to audit your account access logs. You can use it to query and track access via multi-region access points. The supported API operations are as follows:​
  • CreateMultiRegionAccessPoint​
  • GetMultiRegionAccessPoint​
  • ListMultiRegionAccessPoints​
  • DeleteMultiRegionAccessPoint​
For more information, see CloudTrail.​
​
Last updated: 2026.01.21 16:38:31