updateAppGroupAppKeyApiProduct method

Future<GoogleProtobufEmpty> updateAppGroupAppKeyApiProduct(
  1. String name, {
  2. String? action,
  3. String? $fields,
})

Approves or revokes the consumer key for an API product.

After a consumer key is approved, the app can use it to access APIs. A consumer key that is revoked or pending cannot be used to access an API. Any access tokens associated with a revoked consumer key will remain active. However, Apigee checks the status of the consumer key and if set to revoked will not allow access to the API.

Request parameters:

name - Required. Name of the API product in the developer app key in the following format: organizations/{org}/appgroups/{app_group_name}/apps/{app}/keys/{key}/apiproducts/{apiproduct} Value must have pattern ^organizations/\[^/\]+/appgroups/\[^/\]+/apps/\[^/\]+/keys/\[^/\]+/apiproducts/\[^/\]+$.

action - Approve or revoke the consumer key by setting this value to approve or revoke respectively. The Content-Type header, if set, must be set to application/octet-stream, with empty body.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleProtobufEmpty.

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<GoogleProtobufEmpty> updateAppGroupAppKeyApiProduct(
  core.String name, {
  core.String? action,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (action != null) 'action': [action],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

  final response_ = await _requester.request(
    url_,
    'POST',
    queryParams: queryParams_,
  );
  return GoogleProtobufEmpty.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}