Chilkat Online Tools

ValidateResourcePolicy 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('ResourcePolicy','string');$json->UpdateString('SecretId','string');$rest->AddHeader('Content-Type','application/x-amz-json-1.1');$rest->AddHeader('X-Amz-Target','secretsmanager.ValidateResourcePolicy');$json->EmitSb($sbRequestBody);$success = $rest->FullRequestSb('POST','/',$sbRequestBody,$sbResponseBody);$jResp->LoadSb($sbResponseBody);$jResp->put_I($i);$CheckName = $jResp->stringOf('ValidationErrors[i].CheckName');$ErrorMessage = $jResp->stringOf('ValidationErrors[i].ErrorMessage');$i = $i + 1;
?>