ListSecrets delphiDll Example
var
begin
CkAuthAws_putAccessKey(authAws,'AWS_ACCESS_KEY');CkAuthAws_putSecretKey(authAws,'AWS_SECRET_KEY');CkAuthAws_putRegion(authAws,'us-west-2');CkAuthAws_putServiceName(authAws,'secretsmanager');CkRest_SetAuthAws(rest,authAws);success := CkRest_Connect(rest,'secretsmanager.us-west-2.amazonaws.com',443,True,True);CkJsonObject_UpdateString(json,'Filters[0].Key','string');CkJsonObject_UpdateString(json,'Filters[0].Values[0]','string');CkJsonObject_UpdateInt(json,'IncludePlannedDeletion',123);CkJsonObject_UpdateInt(json,'MaxResults',123);CkJsonObject_UpdateString(json,'NextToken','string');CkJsonObject_UpdateString(json,'SortOrder','string');CkRest_AddHeader(rest,'Content-Type','application/x-amz-json-1.1');CkRest_AddHeader(rest,'X-Amz-Target','secretsmanager.ListSecrets');CkJsonObject_EmitSb(json,sbRequestBody);success := CkRest_FullRequestSb(rest,'POST','/',sbRequestBody,sbResponseBody);CkJsonObject_LoadSb(jResp,sbResponseBody);CkJsonObject_putI(jResp,i);ARN := CkJsonObject__stringOf(jResp,'SecretList[i].ARN');CreatedDate := CkJsonObject_IntOf(jResp,'SecretList[i].CreatedDate');DeletedDate := CkJsonObject_IntOf(jResp,'SecretList[i].DeletedDate');Description := CkJsonObject__stringOf(jResp,'SecretList[i].Description');KmsKeyId := CkJsonObject__stringOf(jResp,'SecretList[i].KmsKeyId');LastAccessedDate := CkJsonObject_IntOf(jResp,'SecretList[i].LastAccessedDate');LastChangedDate := CkJsonObject_IntOf(jResp,'SecretList[i].LastChangedDate');LastRotatedDate := CkJsonObject_IntOf(jResp,'SecretList[i].LastRotatedDate');Name := CkJsonObject__stringOf(jResp,'SecretList[i].Name');NextRotationDate := CkJsonObject_IntOf(jResp,'SecretList[i].NextRotationDate');OwningService := CkJsonObject__stringOf(jResp,'SecretList[i].OwningService');PrimaryRegion := CkJsonObject__stringOf(jResp,'SecretList[i].PrimaryRegion');RotationEnabled := CkJsonObject_IntOf(jResp,'SecretList[i].RotationEnabled');RotationLambdaARN := CkJsonObject__stringOf(jResp,'SecretList[i].RotationLambdaARN');AutomaticallyAfterDays := CkJsonObject_IntOf(jResp,'SecretList[i].RotationRules.AutomaticallyAfterDays');Duration := CkJsonObject__stringOf(jResp,'SecretList[i].RotationRules.Duration');ScheduleExpression := CkJsonObject__stringOf(jResp,'SecretList[i].RotationRules.ScheduleExpression');j := 0;count_j := CkJsonObject_SizeOfArray(jResp,'SecretList[i].SecretVersionsToStages.string');CkJsonObject_putJ(jResp,j);strVal := CkJsonObject__stringOf(jResp,'SecretList[i].SecretVersionsToStages.string[j]');j := j + 1;j := 0;count_j := CkJsonObject_SizeOfArray(jResp,'SecretList[i].Tags');CkJsonObject_putJ(jResp,j);Key := CkJsonObject__stringOf(jResp,'SecretList[i].Tags[j].Key');Value := CkJsonObject__stringOf(jResp,'SecretList[i].Tags[j].Value');j := j + 1;i := i + 1;