downloadInstallScript method
- String parent, {
- String? P_password,
- String? hostname,
- String? monitoringPointType,
- String? ntpServerAddress,
- String? ntpServerSecondaryAddress,
- bool? privateConnectivityEnabled,
- String? staticIpAddress_dnsServerAddress,
- String? staticIpAddress_dnsServerSecondaryAddress,
- String? staticIpAddress_domain,
- String? staticIpAddress_gatewayAddress,
- String? staticIpAddress_ipAddress,
- String? staticIpAddress_netmask,
- String? timeZone_id,
- String? timeZone_version,
- bool? useDhcp,
- String? $fields,
Downloads an install script for MonitoringPoints for a given network monitoring provider.
Request parameters:
parent - Required. Parent value for DownloadInstallScriptRequest.
Format:
projects/{project}/locations/{location}/networkMonitoringProviders/{network_monitoring_provider}
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/networkMonitoringProviders/\[^/\]+$.
P_password - Optional. Password for logging into the MonitoringPoint.
hostname - Required. The hostname of the MonitoringPoint, e.g. "test-vm"
monitoringPointType - Required. The type of the monitoring point.
Possible string values are:
- "MONITORING_POINT_TYPE_UNSPECIFIED" : This value should not be used.
- "CONTAINER" : Monitoring Point that runs in a Docker container.
- "KVM" : Monitoring Point that runs in a Kernel-based Virtual Machine (KVM) hypervisor.
- "VMWARE" : Monitoring Point that runs in a VMware hypervisor.
- "HELM" : Monitoring Point that runs on a K8S Helm.
- "GCE_VM" : Monitoring Point that runs as a startup script in a Compute Engine VM.
- "AZURE_VM" : Monitoring Point that runs as a startup script in an Azure VM.
- "AWS_EC2" : Monitoring Point that runs as a startup script in an AWS EC2 instance.
ntpServerAddress - Optional. Network Time Protocol a user can configure.
If the user omits the field, the default is either NTP servers provided in
the DHCP lease or a set of well-known NTP servers pre-configured on the
monitoring point. This field can be an IP address or FQDN.
ntpServerSecondaryAddress - Optional. Second NTP server.
privateConnectivityEnabled - Optional. For Google Cloud MPs, this field
indicates whether the Monitoring Point is deployed in a Private Service
Connect deployment. Not used for non-Google Cloud MPs.
staticIpAddress_dnsServerAddress - Required. DNS server.
staticIpAddress_dnsServerSecondaryAddress - Optional. Second DNS server.
staticIpAddress_domain - Optional. Domain name of the MonitoringPoint.
staticIpAddress_gatewayAddress - Required. Gateway IP address. Example:
"100.80.40.1".
staticIpAddress_ipAddress - Required. IP address of the MonitoringPoint.
staticIpAddress_netmask - Optional. Networkmask and CIDR range. Example:
"255.255.255.0/24"
timeZone_id - IANA Time Zone Database time zone. For example
"America/New_York".
timeZone_version - Optional. IANA Time Zone Database version number. For
example "2019a".
useDhcp - Optional. Dynamic Host Configuration Protocol, is a network
management protocol that automatically assigns IP addresses and other
network configuration parameters to devices connecting to a network.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a HttpBody.
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<HttpBody> downloadInstallScript(
core.String parent, {
core.String? P_password,
core.String? hostname,
core.String? monitoringPointType,
core.String? ntpServerAddress,
core.String? ntpServerSecondaryAddress,
core.bool? privateConnectivityEnabled,
core.String? staticIpAddress_dnsServerAddress,
core.String? staticIpAddress_dnsServerSecondaryAddress,
core.String? staticIpAddress_domain,
core.String? staticIpAddress_gatewayAddress,
core.String? staticIpAddress_ipAddress,
core.String? staticIpAddress_netmask,
core.String? timeZone_id,
core.String? timeZone_version,
core.bool? useDhcp,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'_password': ?P_password == null ? null : [P_password],
'hostname': ?hostname == null ? null : [hostname],
'monitoringPointType': ?monitoringPointType == null
? null
: [monitoringPointType],
'ntpServerAddress': ?ntpServerAddress == null ? null : [ntpServerAddress],
'ntpServerSecondaryAddress': ?ntpServerSecondaryAddress == null
? null
: [ntpServerSecondaryAddress],
'privateConnectivityEnabled': ?privateConnectivityEnabled == null
? null
: ['${privateConnectivityEnabled}'],
'staticIpAddress.dnsServerAddress':
?staticIpAddress_dnsServerAddress == null
? null
: [staticIpAddress_dnsServerAddress],
'staticIpAddress.dnsServerSecondaryAddress':
?staticIpAddress_dnsServerSecondaryAddress == null
? null
: [staticIpAddress_dnsServerSecondaryAddress],
'staticIpAddress.domain': ?staticIpAddress_domain == null
? null
: [staticIpAddress_domain],
'staticIpAddress.gatewayAddress': ?staticIpAddress_gatewayAddress == null
? null
: [staticIpAddress_gatewayAddress],
'staticIpAddress.ipAddress': ?staticIpAddress_ipAddress == null
? null
: [staticIpAddress_ipAddress],
'staticIpAddress.netmask': ?staticIpAddress_netmask == null
? null
: [staticIpAddress_netmask],
'timeZone.id': ?timeZone_id == null ? null : [timeZone_id],
'timeZone.version': ?timeZone_version == null ? null : [timeZone_version],
'useDhcp': ?useDhcp == null ? null : ['${useDhcp}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' +
core.Uri.encodeFull('$parent') +
'/monitoringPoints:downloadInstallScript';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return HttpBody.fromJson(response_ as core.Map<core.String, core.dynamic>);
}