Chilkat Online Tools

PutSecretValue phpExt Example

AWS Secrets Manager

<?php

include("chilkat_9_5_0.php");

$authAws->put_AccessKey('AWS_ACCESS_KEY');$authAws->put_SecretKey('AWS_SECRET_KEY');$authAws->put_Region('us-west-2');$authAws->put_ServiceName('secretsmanager');$rest->SetAuthAws($authAws);$success = $rest->Connect('secretsmanager.us-west-2.amazonaws.com',443,true,true);$json->UpdateString('ClientRequestToken','string');$json->UpdateInt('SecretBinary',123);$json->UpdateString('SecretId','string');$json->UpdateString('SecretString','string');$json->UpdateString('VersionStages[0]','string');$rest->AddHeader('Content-Type','application/x-amz-json-1.1');$rest->AddHeader('X-Amz-Target','secretsmanager.PutSecretValue');$json->EmitSb($sbRequestBody);$success = $rest->FullRequestSb('POST','/',$sbRequestBody,$sbResponseBody);$jResp->LoadSb($sbResponseBody);$jResp->put_I($i);$strVal = $jResp->stringOf('VersionStages[i]');$i = $i + 1;
?>