get method
Returns a specified setting.
Returns a google.rpc.Status
with google.rpc.Code.NOT_FOUND
if the
setting does not exist.
Request parameters:
name
- Required. The name of the setting to get. See Setting for naming
requirements.
Value must have pattern ^organizations/\[^/\]+/settings/\[^/\]+$
.
view
- The SettingView for this request.
Possible string values are:
- "SETTING_VIEW_UNSPECIFIED" : The default / unset value. The API will default to the SETTING_VIEW_BASIC view.
- "SETTING_VIEW_BASIC" : Include Setting.metadata, but nothing else. This is the default value (for both ListSettings and GetSetting).
- "SETTING_VIEW_EFFECTIVE_VALUE" : Include Setting.effective_value, but nothing else.
- "SETTING_VIEW_LOCAL_VALUE" : Include Setting.local_value, but nothing else.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudResourcesettingsV1Setting.
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<GoogleCloudResourcesettingsV1Setting> get(
core.String name, {
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudResourcesettingsV1Setting.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}