Start ECS using AK/SK signing

Sample on how to start an ECS instance using an ak/sk request signing.

For complete source code, see samples-doc/aksksigning/ecs-start on GitHub.

Requirements

Environment variables

Environment variable name

Value

Remarks

ECS_INSTANCE_ID

<ID of ecs instance>

ID of the ecs instance to start

OTC_SDK_PROJECT_ID

<Project ID>

Needed if ecs instance is in a sub project see Obtaining a Project ID

OTC_SDK_AK

<Access Key>

see: Generating AK and SK

OTC_SDK_SK

<Secret Key>

see: Generating AK and SK

Installation and Running

Install and run the sample
# Running the sample
go run .