enrollApp method
Enrolls an app in Play App Signing using a self-hosted Google Cloud KMS key.
Warning: Do not use this method for standard Play App Signing enrollment.
- Standard enrollment with Google-generated or Google-managed keys cannot be done via API. * This advanced API is strictly for enterprise organizations with mandatory compliance, regulatory, or policy requirements to retain key custody in an external Google Cloud KMS instance. * Prerequisites: Requires an active, properly configured Google Cloud KMS key with appropriate IAM permissions granted to Google Play before calling this method. See Help Center: https://support.google.com/googleplay/android-developer/answer/9842756
request - The metadata request object.
Request parameters:
name - Required. Either package name or app ID of the app enrolling in
Play Signing.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a EnrollAppResponse.
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<EnrollAppResponse> enrollApp(
EnrollAppRequest request,
core.String name, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'androidpublisher/v3/applications/' +
commons.escapeVariable('$name') +
'/appSigning:enrollApp';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return EnrollAppResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}