Zum Hauptinhalt springen

Update a MySQL user

PATCH/v2/mysql-users/{mysqlUserId}
API-Version
v2
Request-Methode
PATCH
Operation-ID
database-update-mysql-user

Request​

  • mysqlUserIdstringrequired

    ID of the MySQLUser to update.

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X PATCH \
-d '{"accessIpMask":"string","accessLevel":"full","description":"string","externalAccess":true,"password":"string"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/mysql-users/string
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.database.updateMysqlUser({
"mysqlUserId": "string",
"data": {
"accessIpMask": "string",
"accessLevel": "full",
"description": "string",
"externalAccess": true,
"password": "string"
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Database\UpdateMysqlUser\UpdateMysqlUserRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Database\UpdateMysqlUser\UpdateMysqlUserRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// UpdateMysqlUserRequestBody to learn how to construct a valid instance
$body = new UpdateMysqlUserRequestBody(/* TODO: ... */);

$request = (new UpdateMysqlUserRequest(
mysqlUserId: "string",
body: $body
));
$response = $client->database()->updateMysqlUser($request);

var_dump($response->getBody();

Auf dieser Seite