getBasePathMapping([ 'basePath' => $basePath, 'domainName' => $domainName, ]); return 'The base path mapping\'s effective URI is: ' . $result['@metadata']['effectiveUri']; } catch (AwsException $e) { return 'Error: ' . $e['message']; } } function getsTheBasePathMapping() { $apiGatewayClient = new ApiGatewayClient([ 'profile' => 'default', 'region' => 'us-east-1', 'version' => '2015-07-09' ]); echo getBasePathMapping($apiGatewayClient, '(none)', 'example.com'); } // Uncomment the following line to run this code in an AWS account. // getsTheBasePathMapping(); // snippet-end:[apigateway.php.get_base_path_mapping.main] // snippet-end:[apigateway.php.get_base_path_mapping.complete] // snippet-sourcedescription:[Get_BasePathmapping.php demonstrates how to view base path mapping information in Amazon API Gateway.] // snippet-keyword:[PHP] // snippet-sourcesyntax:[php] // snippet-keyword:[AWS SDK for PHP v3] // snippet-keyword:[Code Sample] // snippet-keyword:[Amazon API Gateway] // snippet-service:[apigateway] // snippet-sourcetype:[full-example] // snippet-sourcedate:[2020-04-13] // snippet-sourceauthor:[pccornel (AWS)]