Edit Edge
    • PDF

    Edit Edge

    • PDF

    Article summary

    Overview

    Change the created CDN Edge settings.

    • Available to request only during operation or in the stopped state.
    • You cannot change service area and service domain.

    Requests

    Request URL

    PUT
    https://edge.apigw.ntruss.com/api/v1/cdn-edges/{edgeId}
    

    Request body

    EdgeConfig

    Parameter nameRequirement statusTypeRestrictionsDescription
    profileIdYesLongProfile ID
    edgeNameYesStringOnly English, numbers and special characters '-' and '_' can be used
    distributionConfigYesCdnDistributionConfigDeployment settings
    originalCopyConfigYesCdnOriginalCopyConfigSource settings
    cachingConfigYesCdnCachingConfigCache settings
    managedRuleYesManagedRuleManage rule settings
    headerPoliciesYesList<HeaderPolicy>Header settings
    optimizationConfigYesOptimizationConfigOptimization setting
    accessControlYesAccessControlAccess control settings

    CdnDistributionConfig

    Parameter nameRequirement statusTypeRestrictionsDescription
    protocolTypeYesStringHTTP, HTTPS, ALLService protocol
    regionTypeYesStringKOREA, JAPAN, GLOBALService region
    serviceDomainYesServiceDomainService domain
    edgeLoggingYesEdgeLoggingEdge logging settings

    ServiceDomain

    Parameter nameRequirement statusTypeRestrictionsDescription
    domainTypeYesStringNCP_DOMAIN_AUTO, NCP_DOMAIN_CUSTOM, CUSTOM_DOMAINDomain use type
    domainNameYesStringUse domain format when using custom domain for domainType
    certificateNoCertificateRequired when using HTTPS and private domain together

    Certificate

    Parameter nameRequirement statusTypeRestrictionsDescription
    idYesLongcertificateNo of the certificate registered in Certificate Manager

    EdgeLogging

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status
    bucketPrefixNoString
    objectStorageNoObjectStorageRequired when enabled is set to true

    ObjectStorage

    Parameter nameRequirement statusTypeRestrictionsDescription
    regionYesStringKR, USWN, SGN, JPN, DENKorea (KR), US West (USWN), Singapore (SGN), Japan (JPN), Germany (DEN)
    bucketNameYesStringObject Storage bucket name

    CdnOriginalCopyConfig

    Parameter nameRequirement statusTypeRestrictionsDescription
    originalCopyLocationYesOriginalCopyLocationSource domain settings
    forwardHostHeaderYesForwardHostHeaderForward Host Header
    originalCopyProtocolYesOriginalCopyProtocolSource protocol settings
    originalCopyPathNoStringSource path
    originShieldYesOriginShieldOrigin shield settings
    originFailoverConfigNoOriginFailoverConfigFailover policy settings

    OriginalCopyLocation

    Parameter nameRequirement statusTypeRestrictionsDescription
    typeYesStringOBJECT_STORAGE, CUSTOM, NONEOrigin type
    regionNoStringKR, SGN, JPN, USWN, DENKorea (KR), Singapore (SGN), Japan (JPN), US West (USWN), Germany (DEN), required when using Object Storage
    bucketNameNoStringRequired if type is Object StorageObject Storage bucket name
    customLocationNoStringRequired if type is customOnly one bucketName and customLocation can be used depending on the type

    ForwardHostHeader

    Parameter nameRequirement statusTypeRestrictionsDescription
    typeYesStringINCOMING_HOST_HEADER, ORIGIN_HOSTNAME, CUSTOM
    customHostHeaderNoStringRequired if type is custom

    OriginalCopyProtocol

    Parameter nameRequirement statusTypeRestrictionsDescription
    typeYesStringHTTP, HTTPSOrigin protocol
    portYesIntegerOrigin port

    OriginShield

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status
    regionNoStringKR, SGN, JPN, USWN, DENKorea (KR), Singapore (SGN), Japan (JPN), US West (USWN), Germany (DEN), required when enabled is set to true

    OriginFailoverConfig

    Parameter nameRequirement statusTypeRestrictionsDescription
    ruleNameYesString
    statusCodesYesList<Integer>404, 500, 502, 503, 504
    originalCopyLocationYesOriginalCopyLocation

    CdnCachingConfig

    Parameter nameRequirement statusTypeRestrictionsDescription
    defaultCachingYesDefaultCachingDefault cache settings
    negativeTtlYesbooleantrue, falseUse status, error response cache setting
    bypassQueryStringYesBypassQueryString
    cacheKeyHostnameYesStringINCOMING_HOST_HEADER, ORIGIN_HOSTNAME
    cacheKeyIgnoreQueryStringYesCacheKeyIgnoreQueryString
    removeVaryHeaderYesbooleantrue, falseUse status
    edgeAuthYesEdgeAuthValidate user requests using tokens
    cachingRulesYesList<CachingRule>Cache detailed settings

    DefaultCaching

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status
    ruleDefinitionTypeYesStringCACHING, BYPASS_CACHE, ORIGIN_CACHE_CONTROL_HEADER
    cacheRevalidateConfigYesCacheRevalidateConfig

    CacheRevalidateConfig

    Parameter nameRequirement statusTypeRestrictionsDescription
    typeYesStringIF_POSSIBLE, ALWAYSServe stale if unable to validate(IF_POSSIBLE), Always revalidate with origin(ALWAYS)
    ageTypeYesStringSECONDS, MINUTES, HOURS, DAYS
    ageYesIntegerChange unit of time according to ageType

    BypassQueryString

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status
    queryStringsNoList<String>Required when enabled is set to true

    CacheKeyIgnoreQueryString

    Parameter nameRequirement statusTypeRestrictionsDescription
    typeYesStringALL_IGNORED, ALL_ALLOWED, ALLOW_SPECIFIC_STRING
    queryStringsNoList<String>Required when using type ALLOW_SPECIFIC_STRING

    EdgeAuth

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status
    typeYesStringSIGNED_URL, JWT, MEDIA_VAULTIf Global is chosen as Service Region, only MEDIA_VAULT can be used
    Korea and Japan are both available for Service Regions
    tokenNameNoStringOnly English lowercase letters can be used without spaces, required when enabled is set to true
    tokenKeyNoStringRequired when enabled is set to true
    bypassValuesNoList<String>MEDIA_VAULT is not supportedExpander for which certification is to be excluded (up to 20)
    e.g., .ts, .jpg, .exe
    tokenBypassValuesNoList<String>MEDIA_VAULT is not supportedExpander for which original is to be transmitted as certification value (up to 20)
    e.g., playlist.m3u8, index.m3u8, .ts, .png

    CachingRule

    Parameter nameRequirement statusTypeRestrictionsDescription
    ruleNameYesString
    ruleTypeYesStringDIRECTORY, FILE_EXTENSION, ADVANCED
    ruleConditionsYesList<String>
    ruleDefinitionTypeYesStringCACHING, BYPASS_CACHE, ORIGIN_CACHE_CONTROL_HEADER
    cacheRevalidateConfigYesCacheRevalidateConfig
    ruleBasedRoutingConfigYesRuleBasedRoutingConfig
    browserCacheYesBrowserCache
    cacheKeyQueryParameterYesCacheKeyQueryParameter
    accessDenyYesbooleantrue, false
    urlRedirectYesUrlRedirect
    urlRewriteYesUrlRewrite

    RuleBasedRoutingConfig

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status
    originalCopyLocationNoOriginalCopyLocationRequired when enabled is set to true

    BrowserCache

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status
    typeNoStringRequired when ALLOW_CACHE, NO_CACHE, enabled are set to true
    ageTypeNoStringRequired when SECONDS, MINUTES, HOURS, DAYS, enabled are set to true
    ageNoIntegerRequired when enabled is set to true

    CacheKeyQueryParameter

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status
    typeYesStringALL_IGNORED, ALL_ALLOWED, ALLOW_SPECIFIC_STRING, IGNORE_SPECIFIC_STRING
    queryParametersNoList<String>Required when using type ALLOW_SPECIFIC_STRING, IGNORE_SPECIFIC_STRING

    UrlRedirect

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status, UrlRedirect and UrlRewrite cannot be used simultaneously
    destinationProtocolNoStringRequired when HTTP, HTTPS, enabled are set to true
    destinationHostnameNoStringRequired when enabled is set to true
    destinationPathNoStringRequired when enabled is set to true
    responseCodeNoStringRequired when MOVED_PERMANENTLY_301, FOUND_302, enabled are set to true

    UrlRewrite

    Parameter nameRequirement statusTypeRestrictionsDescription
    enabledYesbooleantrue, falseUse status, UrlRedirect and UrlRewrite cannot be used simultaneously
    rewriteTargetNoStringRequired when enabled is set to true

    ManagedRule

    Parameter nameRequirement statusTypeRestrictionsDescription
    corsYesbooleantrue, falseUse status
    http2Yesbooleantrue, falseUse status
    trueClientIpHeaderYesbooleantrue, falseUse status
    hstsYesbooleantrue, falseUse status

    HeaderPolicy

    Parameter nameRequirement statusTypeRestrictionsDescription
    typeYesStringORIGIN_REQUEST, CLIENT_RESPONSE
    ruleNameYesString
    headerYesHeader

    Header

    Parameter nameRequirement statusTypeRestrictionsDescription
    typeYesStringADD, MODIFY, REMOVE
    nameYesString
    valueYesString

    OptimizationConfig

    Parameter nameRequirement statusTypeRestrictionsDescription
    httpCompressionYesbooleantrue, falseUse status
    largeFileOptimizationYesbooleantrue, falseUse status

    AccessControl

    Parameter nameRequirement statusTypeRestrictionsDescription
    typeYesWHITELIST, BLACKLISTAll access control rules can use only one policy
    ipPoliciesYesList<String>Only IP format available
    geoPoliciesYesList<String>ISO 3166-1 alpha-2 country codes available
    refererPoliciesYesList<String>Only domain format available

    Responses

    Every response returns success or failure with an HTTP status code.

    HTTP status codeCode messageDescription
    200SuccessSearch succeeded
    401UnauthorizedAuthentication failed
    500Internal Server ErrorServer error

    Examples

    Request Examples

    https://edge.apigw.ntruss.com/api/v1/cdn-edges/123
    
    {
        "profileId": 234,
        "edgeName": "sample-edge",
        "distributionConfig": {
            "protocolType": "ALL",
            "regionType": "KOREA",
            "serviceDomain": {
                "domainType": "NCP_DOMAIN_AUTO",
                "domainName": null,
                "certificate": null
            },
            "edgeLogging": {
                "enabled": true,
                "objectStorage": {
                    "region": "KR",
                    "bucketName": "sample-bucket"
                },
                "bucketPrefix": "log/sample"
            }
        },
        "originalCopyConfig": {
            "originalCopyLocation": {
                "type": "OBJECT_STORAGE",
                "region": "KR",
                "bucketName":"sample-bucket",
                "customLocation": null
            },
            "forwardHostHeader": {
                "type": "ORIGIN_HOSTNAME",
                "customHostHeader": null
            },
            "originalCopyProtocol": {
                "type": "HTTP",
                "port": 80
            },
            "originalCopyPath": null,
            "originShield": {
                "enabled": true,
                "region": "USWN"
            },
            "originFailoverConfig": null
        },
        "cachingConfig": {
            "defaultCaching": {
                "enabled": true,
                "ruleDefinitionType": "CACHING",
                "cacheRevalidateConfig": {
                    "type": "IF_POSSIBLE",
                    "ageType": "HOURS",
                    "age": "10"
                }
            },
            "negativeTtl": true,
            "bypassQueryString": {
                "enabled": true,
                "queryStrings": ["aaa", "bbb", "ccc"]
            },
            "cacheKeyHostname": "INCOMING_HOST_HEADER",
            "cacheKeyIgnoreQueryString": {
                "type": "ALL_ALLOWED",
                "queryStrings": []
            },
            "removeVaryHeader": true,
            "edgeAuth": {
                "enabled": true,
                "type": "SIGNED_URL",
                "tokenName": "name",
                "tokenKey": "902bceb96b2139771716910ff0b9befb"
            },
            "cachingRules": [{
                "ruleName": "sample",
                "ruleType": "DIRECTORY",
                "ruleConditions": ["/sample/*"],
                "ruleDefinitionType": "CACHING",
                "cacheRevalidateConfig": {
                    "type": "IF_POSSIBLE",
                    "ageType": "SECONDS",
                    "age": 100
                },
                "ruleBasedRoutingConfig": {
                    "enabled": true,
                    "originalCopyLocation": {
                        "type": "OBJECT_STORAGE",
                        "region": "KR",
                        "bucketName": "sample-bucket",
                        "customLocation": null
                    }
                },
                "browserCache": {
                    "enabled": true,
                    "type": "ALLOW_CACHE",
                    "age": 100,
                    "ageType": "SECONDS"
                },
                "cacheKeyQueryParameter": {
                    "enabled": true,
                    "type": "IGNORE_SPECIFIC_STRING",
                    "queryParameters": ["aaa", "bbb", "ccc"]
                },
                "accessDeny": false,
                "urlRedirect": {
                    "enabled": true,
                    "destinationProtocol": "HTTP",
                    "destinationHostname": "ncloud.com",
                    "destinationPath": "/home",
                    "responseCode": "FOUND_302"
                },
                "urlRewrite": {
                    "enabled": false,
                    "rewriteTarget": null
                }
            }]
        },
        "managedRule": {
            "cors": true,
            "http2": true,
            "trueClientIpHeader": true,
            "hsts": false
        },
        "headerPolicies": [{
            "type": "ORIGIN_REQUEST",
            "ruleName": "Modify Origin Reqeust Header",
            "header": {
                "type": "ADD",
                "name": "name",
                "value": "value"
            }
        }, {
            "type": "CLIENT_RESPONSE",
            "ruleName": "Modify Client Response Header",
            "header": {
                "type": "MODIFY",
                "name": "name",
                "value": "value"
            }
        }],
        "optimizationConfig": {
            "httpCompression": true,
            "largeFileOptimization": true
        },
        "accessControl": {
            "type": "WHITELIST",
            "ipPolicies": ["1.1.1.1", "2.2.2.2", "3.3.3.3"],
            "geoPolicies": ["AL", "SK", "ZM"],
            "refererPolicies": ["ncloud.com", "naver.com"]
        }
    }
    

    Response examples

    {
        "code": "0000",
        "message": "Success",
        "result": {
            "edgeId": 123
        }
    }
    

    Errors

    Error codeDescription
    0032Unauthorized request
    9999Server error occurred

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.