create method
- GoogleChromeManagementVersionsV1ConnectorConfig request,
- String parent, {
- String? connectorConfigId,
- String? $fields,
Creates a connector config.
request - The metadata request object.
Request parameters:
parent - Required. Format: customers/{customer}
Value must have pattern ^customers/\[^/\]+$.
connectorConfigId - Optional. ID to use for the connector config, which
becomes the final component of the connector config's resource name. If
provided, the ID must be 1-36 characters long, and contain only lowercase
letters, digits, and hyphens. It must start with a letter, and end with a
letter or number. If not provided, the connector config will be assigned a
random UUID.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a GoogleChromeManagementVersionsV1ConnectorConfig.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<GoogleChromeManagementVersionsV1ConnectorConfig> create(
GoogleChromeManagementVersionsV1ConnectorConfig request,
core.String parent, {
core.String? connectorConfigId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'connectorConfigId': ?connectorConfigId == null
? null
: [connectorConfigId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/connectorConfigs';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleChromeManagementVersionsV1ConnectorConfig.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}