프로브 경로가 유효한 경로이고 파일에 액세스할 수 있는지 확인합니다. 프로브 경로는 CDN 엔드포인트를 통해 동적 콘텐츠의 배달을 가속화하는 데 도움이 되도록 원본 서버에서 호스트되는 파일의 경로입니다. 이 경로는 엔드포인트 구성에 지정된 원본 경로를 기준으로 합니다.
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe?api-version=2023-05-01
URI 매개 변수
Name |
In(다음 안에) |
필수 |
형식 |
Description |
subscriptionId
|
path |
True
|
string
|
Azure 구독 ID입니다.
|
api-version
|
query |
True
|
string
|
클라이언트 요청과 함께 사용할 API의 버전입니다. 현재 버전은 2023-05-01입니다.
|
요청 본문
Name |
필수 |
형식 |
Description |
probeURL
|
True
|
string
|
유효성을 검사할 프로브 URL입니다.
|
응답
보안
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
사용자 계정 가장
|
예제
ValidateProbe
Sample Request
POST https://management.azure.com/subscriptions/subid/providers/Microsoft.Cdn/validateProbe?api-version=2023-05-01
{
"probeURL": "https://www.bing.com/image"
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.cdn import CdnManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-cdn
# USAGE
python validate_probe.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = CdnManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.validate_probe(
validate_probe_input={"probeURL": "https://www.bing.com/image"},
)
print(response)
# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/ValidateProbe.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcdn_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7b551033155a63739b6d28f79b9c07569f6179b8/specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/ValidateProbe.json
func ExampleManagementClient_ValidateProbe() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcdn.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewManagementClient().ValidateProbe(ctx, armcdn.ValidateProbeInput{
ProbeURL: to.Ptr("https://www.bing.com/image"),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ValidateProbeOutput = armcdn.ValidateProbeOutput{
// ErrorCode: to.Ptr("None"),
// IsValid: to.Ptr(true),
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { CdnManagementClient } = require("@azure/arm-cdn");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path specified in the endpoint configuration.
*
* @summary Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path specified in the endpoint configuration.
* x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/ValidateProbe.json
*/
async function validateProbe() {
const subscriptionId = process.env["CDN_SUBSCRIPTION_ID"] || "subid";
const validateProbeInput = {
probeURL: "https://www.bing.com/image",
};
const credential = new DefaultAzureCredential();
const client = new CdnManagementClient(credential, subscriptionId);
const result = await client.validateProbe(validateProbeInput);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"isValid": true,
"errorCode": "None",
"message": null
}
정의
ErrorAdditionalInfo
리소스 관리 오류 추가 정보입니다.
Name |
형식 |
Description |
info
|
object
|
추가 정보입니다.
|
type
|
string
|
추가 정보 유형입니다.
|
ErrorDetail
오류 세부 정보입니다.
Name |
형식 |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
오류 추가 정보입니다.
|
code
|
string
|
오류 코드입니다.
|
details
|
ErrorDetail[]
|
오류 세부 정보입니다.
|
message
|
string
|
오류 메시지입니다.
|
target
|
string
|
오류 대상입니다.
|
ErrorResponse
오류 응답
유효성 검사 프로브 API의 입력입니다.
Name |
형식 |
Description |
probeURL
|
string
|
유효성을 검사할 프로브 URL입니다.
|
ValidateProbeOutput
유효성 검사 프로브 API의 출력입니다.
Name |
형식 |
Description |
errorCode
|
string
|
프로브 URL이 허용되지 않는 경우 오류 코드를 지정합니다.
|
isValid
|
boolean
|
프로브 URL이 허용되는지 여부를 나타냅니다.
|
message
|
string
|
프로브 URL이 허용되지 않는 이유를 설명하는 자세한 오류 메시지입니다.
|