Documentation API Docs Domain Configuration UpdateAmazonS3AuthorizationConfig

UpdateAmazonS3AuthorizationConfig

Update time: 2026-08-14 11:26:29

Applicable Products

Dynamic Web Acceleration,Media Acceleration VoD,Media Acceleration Live Broadcast,Content Acceleration

API Description

Modify amazon s3 access authorization configurations. The interface * can be domain name or domain id.

  • API URL: https://api.atomile.com/api/config/amazons3access/*
  • Method: PUT
  • Limit Description: · The accelerated domain name must have been filed. · Accelerated domain names must not contain the following information: sales of drugs and controlled tools, including illegal speech and information. · Video-accelerated domain names must have audiovisual licenses; blog forums or community-based accelerated domain names must have BBS special approval qualifications. · Interface requests and return results only accept xml format.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Path Params

NameDescription
*domainString
Domain ID or domain name.

Body Params

NameDescription
*amazon-s3-access-authorization-rulesList
Amazon S3 Access Authorization Configuration, parent node 1. When you need to configure the Amazon S3 Access Authorization rules, this must be filled in. 2. Configuration of clearing for . 3.vodstream/download support, web/wsa does not support. 4.Amason S3 and Aliyun OSS cannot be configured simultaneously.
*path-patternString
The url matching mode. If all matches, the input parameters can be configured as: .*
except-path-patternString
The exception url matching mode.
*add-authorization-headerString
Define whether to add Authorization header when back to Amazon S3 source. Allowed true and false.
*access-keyString
access key
*access-key-idString
access key id
signature-versionString
Signature version, default value is 2. Support 2 and 4.
regionString
Authorization region. Please refer to the AWS official site for detail.
data-idLong
Data-id is to indicate a specific group configuration when the client has multiple groups of configurations. Data-id can be retrieved through a query interface. Note: A. If data-id is passed, it means that one group of configuration items is specified to be modified, and no other group configuration items need to be modified. B. If multiple groups of configurations are included, some of them are configured with data-id and others are not, then the expression of data-id is used to modify a specific group of configurations, and a new group of configurations is added on the original basis without the expression of data-id. C. If the data-id is not transmitted, it means that the original configuration will be fully covered by this configuration. D. If no configuration parameter is passed, only domain name and secondary label are passed, which means that all configuration of domain name secondary service corresponding to this interface is cleared. E. If there is no specific configuration item in a set of configurations, the data-id must be filled in, and the value is the actual data-id, which means clearing the value of the corresponding data-id configuration item; it is not allowed that there is no specific configuration item or data-id in a set of configurations.

Response parameter(s)

Body Params

NameDescription
codeString
The error code, when HTTPStatus is not 202, indicates the type of error the current request is calling.
messageString
Response information, when success is successful

Error code

Error code(code)Description(message)HTTP statusSemantic
InvalidParameterNo amazon-s3-access-authorization-rules was specified.400No amazon-s3-access-authorization-rules was specified.
InvalidParameterThe request has null config with null data-id, please remove it.400The request has null config with null data-id, please remove it.
InvalidParameterThe specified path-pattern could not be blank.400The specified path-pattern could not be blank.
InvalidParameterThe specified add-authorization-header could not be blank.400The specified add-authorization-header could not be blank.
InvalidParameterThe specified add-authorization-header is invalid.400The specified add-authorization-header is invalid.
InvalidParameterThe specified access-key could not be blank.400The specified access-key could not be blank.
InvalidParameterThe specified access-key-id could not be blank.400The specified access-key-id could not be blank.
InvalidParameterThe specified signature-version could not be blank.400The specified signature-version could not be blank.
InvalidParameterThe specified signature-version is invalid.400The specified signature-version is invalid.
NoSuchDomainThe specified domain does not exist.404The specified domain does not exist.
CustomerNoOwnDomaincustomer not own domain name[{0}]400customer not own domain name[{0}]

Example

JSON
XML
JSON
Request example
Copy Copy success
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://{@apiDomain}/api/config/amazons3access/123344" \
-X "PUT" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-d '
{
    "amazon-s3-access-authorization-rules":[
        {
          "data-id":"1",
          "add-authorization-header":"true",
          "path-pattern":".*",
          "except-path-pattern":"",
          "access-key":"yourAccessKey",
          "access-key-id":"yourAccessKeyID",
          "signature-version":"4",
          "region":"us-east-1"
        }
    ]
}'
Response example
Copy Copy success
HTTP/1.1 202 Accepted
Date: Sun, 05 May 2019 09:08:53 GMT
Content-Type: application/json;charset=utf-8
x-cnc-request-id: 83bbebc7-2c95-47d7
{"message":"success"}