updateDeveloperAppKeyApiProduct method

Future<GoogleProtobufEmpty> updateDeveloperAppKeyApiProduct(
  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 - Name of the API product in the developer app key in the following format: organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}/apiproducts/{apiproduct} Value must have pattern ^organizations/\[^/\]+/developers/\[^/\]+/apps/\[^/\]+/keys/\[^/\]+/apiproducts/\[^/\]+$.

action - Approve or revoke the consumer key by setting this value to approve or revoke, respectively.

$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> updateDeveloperAppKeyApiProduct(
  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>);
}