createCustomPlugin method

Future<CreateCustomPluginResponse> createCustomPlugin({
  1. required CustomPluginContentType contentType,
  2. required CustomPluginLocation location,
  3. required String name,
  4. String? description,
  5. Map<String, String>? tags,
})

Creates a custom plugin using the specified properties.

May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter contentType : The type of the plugin file.

Parameter location : Information about the location of a custom plugin.

Parameter name : The name of the custom plugin.

Parameter description : A summary description of the custom plugin.

Parameter tags : The tags you want to attach to the custom plugin.

Implementation

Future<CreateCustomPluginResponse> createCustomPlugin({
  required CustomPluginContentType contentType,
  required CustomPluginLocation location,
  required String name,
  String? description,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'contentType': contentType.value,
    'location': location,
    'name': name,
    if (description != null) 'description': description,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/custom-plugins',
    exceptionFnMap: _exceptionFns,
  );
  return CreateCustomPluginResponse.fromJson(response);
}