HTTP Resolver: x-amz-target

0

I learned how to access AWS services by HTTP Resolver at the following thread:
https://forums.aws.amazon.com/thread.jspa?threadID=314359&tstart=0

I have one new question.
How can I find out what "x-amz-target" to specify for each AWS service?

ex.

"AWSKendraFrontendService.Query", "AmazonForecastRuntime.QueryForecast", "AWSHawksNestServiceFacade.GetPrediction", "Comprehend_20171127.DetectSentiment", "DynamoDB_20120810.CreateTable", "AWSStepFunctions.ListStateMachines", ...

I use aws-cli's debug option.

aws transcribe list-transcription-jobs --debug

output:

2020-01-09 16:24:26,323 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2020-01-09 16:24:26,323 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-amz-json-1.1
host:transcribe.ap-northeast-1.amazonaws.com
x-amz-date:20200109T072426Z
x-amz-target:Transcribe.ListTranscriptionJobs

Or, I may find out by referring to service-2.json of each service from https://github.com/boto/botocore/tree/develop/botocore/data

Is there the best way to find out what to specify for "x-amz-target" ?
Is there a list of "x-amz-target" ?

질문됨 4년 전2827회 조회
3개 답변
0

You can have a look at the normal.json files for each service and it usually is a combination of the targetPrefix property and the actual operation name:

https://github.com/aws/aws-sdk-js/tree/master/apis

Here's an example:
https://github.com/aws/aws-sdk-js/blob/master/apis/comprehend-2017-11-27.normal.json#L12

답변함 4년 전
0

I wrote up an article explaining how to find these if you ever need to find more of them - https://tim.mattison.org/ff05f764590845e0bd2e1f8ccdebd24a

답변함 2년 전
-1

My question has been resolved by your answer. Thank you for your help !!

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠