SaveCdnDomainConfig

更新时间:
复制 MD 格式

Configure a CDN domain.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mpserverless:SaveCdnDomainConfig

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TenantId

string

No

The tenant ID.

UNIULEH***

SpaceId

string

Yes

The service space ID.

mp-03c11beb-****-4d02-bb40-65a7ad224f4d

Type

string

Yes

  • FILE: Configures cloud storage CDN.

  • WEB: Configures static website hosting CDN.

FILE

CorsConfig

string

No

  • Set cross-domain: `{"allowOrigin":"https://*.example.com", "accessOriginControl": true}`.

  • Delete cross-domain:
    • Method 1: `{"type":"remove", "configId": "268021436***"}`.

    • Method 2: `{"allowOrigin":"", "configId": "268021436***"}`.

{"allowOrigin":"https://*.example.com", "accessOriginControl": true}

RefererConfig

string

No

  • Set whitelist: `{"type":"white", "referList":"example.com", "allowEmpty":"off", "disableAst":"off"}`

  • Set blacklist: `{"type":"black", "referList":"example.com", "allowEmpty":"off", "disableAst":"off"}`

  • Delete configuration: `{"type":"remove", "configId": "268021436***"}`

{"type":"white", "referList":"example.com", "allowEmpty":"off", "disableAst":"off"}

IpConfig

string

No

  • Set whitelist: `{"type":"white", "ipList":"192.168.2.0/24"}`

  • Set blacklist: `{"type":"black", "ipList":"192.168.2.0/24"}`

  • Delete configuration: `{"type":"remove", "configId": "268021436***"}`

{"type":"white", "ipList":"192.168.2.0/24"}

UaConfig

string

No

  • Set whitelist: `{"type":"white", "uaList":"*IE*|*firefox*"}`

  • Set blacklist: `{"type":"black", "uaList":"*IE*|*firefox*"}`

  • Delete configuration: `{"type":"remove", "configId": "268021436***"}`

{"type":"white", "uaList":"*IE*|*firefox*"}

AuthConfig

string

No

Configure the authentication pattern. This is only valid in FILE pattern. After enabling authentication, complete URL signature calculation using the authentication add signature algorithm to access files. Quickly obtain the signed URL through the service-side `file.info` API or the control-side `ListFile` API.

  • Enable authentication pattern, set the default URL validity period to 1800 seconds, and use Type A authentication: `{"authType":"type_a", "authKey":"hkpyytgrnf", "authDelta":1800}`

  • Disable authentication pattern: `{"authType":"no_auth"}`

{"authType":"type_a", "authKey":"hkpyytgrnf", "authDelta":1800}

To configure a Referer or IP whitelist, you must first manually delete any existing blacklist configurations. To configure a blacklist, you must first manually delete any existing whitelist configurations. UA blacklists and whitelists support overwriting, so manual deletion is not required.

Response elements

Element

Type

Description

Example

object

RequestId

string

The unique request ID.

9B1D280D-F8C8-****-B30F-BDE5A981FDA9

Examples

Success response

JSON format

{
  "RequestId": "9B1D280D-F8C8-****-B30F-BDE5A981FDA9"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.