aws-sdk-php-automation on 3.233.1
aws-sdk-php-automation on master
Update models for release 3.233.1 release (compare)
hi there, I want to use the elasticsearch Analyse api with Php, but the PHP sdk does not support it. the documents configuration.asciidoc show that I can add a new endpoint, but I am un sure where to put this code - ie: it says $this->transport, indicating it should be put in Client.php?? But I dont want to edit the vendor files... can you please help? $transport = $this->transport;
$serializer = $this->serializer;
$newEndpoint = function ($class) use ($transport, $serializer) {
if ($class == 'SuperSearch') {
return new MyProject\SuperSearch($transport);
} else {
// Default handler
$fullPath = '\Elasticsearch\Endpoints\' . $class;
if ($class === 'Bulk' || $class === 'Msearch' || $class === 'MPercolate') {
return new $fullPath($transport, $serializer);
} else {
return new $fullPath($transport);
}
}
};
$client = ClientBuilder::create()
->setEndpoint($newEndpoint)
->build();
Hey, Everyone does anyone have an idea of how to use AWS AppConfig with the AWS SDK PHP.
My Particular use case is, I am running a simple PHP app on the EC2 instance and want to receive the JSON configurations written in the AppConfig.
require 'vendor/autoload.php';
use Aws\AppConfig\Exception\AppConfigException;
use Aws\AppConfig\AppConfigClient;
$appConfigClient = new AppConfigClient(['version' => 'latest', 'region' => 'ap-south-1']);
$clientid = uniqid('', true);
$params = [
'Application' => $APP_CONFIG_APP,
'ClientId' => $clientid,
'Configuration' => $APP_CONFIG_CONFIGURATION_PROFILE,
'Environment' => $APP_CONFIG_ENVIRONMENT
];
$response = $appConfigClient->getConfiguration($params);
$config = $response['Content'];
Also, I am authorizing with the AppConfig by an Adminstrator IAM Role Provided so, no issues on that side and I am able to get the following output
{ "Content": {}, "ConfigurationVersion": "1", "ContentType": "application\/octet-stream", "@metadata": { "statusCode": 200, client_id=60696", and some more fields...}
But the issue is I am not getting the AppConfig Content but able to extract the metadata regarding the Data.
So, Anyone who had tried this please help me out here.
$revoked = $this->getEC2Client($awsZone)->revokeSecurityGroupIngress([
'GroupId' => $securityGroup['GroupId'],
//'GroupName' => $securityGroup['GroupName'],
'IpPermissions' => $securityGroup['IpPermissions']
]);
InvalidRequest (client): The request received was invalid