postAccountKeysWithHttpInfo method

Future<Response> postAccountKeysWithHttpInfo(
  1. KeyTypeIn keyTypeIn
)

Creates — or rotates — the caller's API key of the requested type and returns it ONCE.

Creates — or rotates — the caller's API key of the requested type and returns it ONCE. A real IAM failure surfaces as 502, never a fabricated key. Rotating is what creating means here: a user holds one key per type, so the endpoint is idempotent by (caller, type) and the superseded credential stops working. Two live secrets for one user would make "revoke my key" a lie.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> postAccountKeysWithHttpInfo(KeyTypeIn keyTypeIn,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/account/keys';

  // ignore: prefer_final_locals
  Object? postBody = keyTypeIn;

  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,
  );
}