get method
Producers can use this method to retrieve information about the DNS record set added to the private zone inside the shared tenant host project associated with a consumer network.
Request parameters:
parent
- Required. Parent resource identifying the connection which owns
this collection of DNS zones in the format services/{service}.
Value must have pattern ^services/\[^/\]+$
.
consumerNetwork
- Required. The consumer network containing the record
set. Must be in the form of projects/{project}/global/networks/{network}
domain
- Required. The domain name of the zone containing the recordset.
type
- Required. RecordSet Type eg. type='A'. See the list of
Supported DNS Types.
zone
- Required. The name of the zone containing the record set.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a DnsRecordSet.
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<DnsRecordSet> get(
core.String parent, {
core.String? consumerNetwork,
core.String? domain,
core.String? type,
core.String? zone,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (consumerNetwork != null) 'consumerNetwork': [consumerNetwork],
if (domain != null) 'domain': [domain],
if (type != null) 'type': [type],
if (zone != null) 'zone': [zone],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/dnsRecordSets:get';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return DnsRecordSet.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}