Scalr\Service\Aws\Ec2\V20150415\Ec2Api::disassociateRouteTable PHP Method

disassociateRouteTable() public method

Disassociates a subnet from a route table. After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table.
public disassociateRouteTable ( string $associationId ) : boolean
$associationId string The association ID representing the current association between the route table and subnet.
return boolean Returns TRUE on success
    public function disassociateRouteTable($associationId)
    {
        $result = false;
        $options = ['AssociationId' => (string) $associationId];
        $action = ucfirst(__FUNCTION__);
        $response = $this->client->call($action, $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            if ((string) $sxml->return != 'true') {
                throw new Ec2Exception(sprintf('Amazon Ec2 could not %s AssociationId:"%s". It returned "%s"', $action, $options['AssociationId'], $sxml->return));
            }
            $result = true;
        }
        return $result;
    }
Ec2Api