rotateMachineSecretKeyWithHttpInfo method
Future<Response>
rotateMachineSecretKeyWithHttpInfo(
- String machineId,
- RotateMachineSecretKeyRequest rotateMachineSecretKeyRequest
Rotate a machine's secret key
Rotates the machine's secret key. When the secret key is rotated, make sure to update it in your machine/application. The previous secret key will remain valid for the duration specified by the previous_token_ttl parameter.
Note: This method returns the HTTP Response.
Parameters:
-
String machineId (required): The ID of the machine to rotate the secret key for
-
RotateMachineSecretKeyRequest rotateMachineSecretKeyRequest (required):
Implementation
Future<http.Response> rotateMachineSecretKeyWithHttpInfo(
String machineId,
RotateMachineSecretKeyRequest rotateMachineSecretKeyRequest,
) async {
// ignore: prefer_const_declarations
final path = r'/machines/{machine_id}/secret_key/rotate'
.replaceAll('{machine_id}', machineId);
// ignore: prefer_final_locals
Object? postBody = rotateMachineSecretKeyRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}