updateApiProxyRevision method
- GoogleApiHttpBody request,
- String name, {
- bool? validate,
- String? $fields,
Updates an existing API proxy revision by uploading the API proxy configuration bundle as a zip file from your local machine.
You can update only API proxy revisions that have never been deployed.
After deployment, an API proxy revision becomes immutable, even if it is
undeployed. Set the Content-Type
header to either multipart/form-data
or application/octet-stream
.
request
- The metadata request object.
Request parameters:
name
- Required. API proxy revision to update in the following format:
organizations/{org}/apis/{api}/revisions/{rev}
Value must have pattern
^organizations/\[^/\]+/apis/\[^/\]+/revisions/\[^/\]+$
.
validate
- Ignored. All uploads are validated regardless of the value of
this field. Maintained for compatibility with Apigee Edge API.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudApigeeV1ApiProxyRevision.
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<GoogleCloudApigeeV1ApiProxyRevision> updateApiProxyRevision(
GoogleApiHttpBody request,
core.String name, {
core.bool? validate,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (validate != null) 'validate': ['${validate}'],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleCloudApigeeV1ApiProxyRevision.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}