// SetExternalId sets the ExternalId field's value.
425385
func (s *ModifyHsmInput) SetExternalId(v string) *ModifyHsmInput {
	s.ExternalId = &v
	return s
}
830580
func (s *HistoryEvent) SetExternalWorkflowExecutionCancelRequestedEventAttributes(v *ExternalWorkflowExecutionCancelRequestedEventAttributes) *HistoryEvent {
	s.ExternalWorkflowExecutionCancelRequestedEventAttributes = v
	return s
}
521920
func (s *CancelMaintenanceWindowExecutionInput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionInput {
	s.WindowExecutionId = &v
	return s
}
203557
func (s *InstanceSnapshot) SetFromBundleId(v string) *InstanceSnapshot {
	s.FromBundleId = &v
	return s
}
249420
func (v *Volume) SetExternalVolume(name, provider string) *ExternalVolume {
	ev := &ExternalVolume{
		Name:     name,
		Provider: provider,
	}
	v.External = ev
	return ev
}
1006130
func (s *ModifyEndpointInput) SetExternalTableDefinition(v string) *ModifyEndpointInput {
	s.ExternalTableDefinition = &v
	return s
}
35273
func (s *UpdateIntegrationInput) SetIntegrationId(v string) *UpdateIntegrationInput {
	s.IntegrationId = &v
	return s
}
331628
func (s *SmsConfigurationType) SetExternalId(v string) *SmsConfigurationType {
	s.ExternalId = &v
	return s
}
654189
func (s *DescribeContinuousExportsInput) SetExportIds(v []*string) *DescribeContinuousExportsInput {
	s.ExportIds = v
	return s
}
318541
func (s *InstanceSnapshotInfo) SetFromBundleId(v string) *InstanceSnapshotInfo {
	s.FromBundleId = &v
	return s
}
637439
func (s *GetMaintenanceWindowExecutionTaskInput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskInput {
	s.WindowExecutionId = &v
	return s
}
122169
func (s *Output) SetExtension(v string) *Output {
	s.Extension = &v
	return s
}
714356
func (s *DescribeMaintenanceWindowExecutionTasksInput) SetWindowExecutionId(v string) *DescribeMaintenanceWindowExecutionTasksInput {
	s.WindowExecutionId = &v
	return s
}
350975
func (s *CreateEndpointInput) SetExternalTableDefinition(v string) *CreateEndpointInput {
	s.ExternalTableDefinition = &v
	return s
}
394612
func (s *DescribeExportConfigurationsInput) SetExportIds(v []*string) *DescribeExportConfigurationsInput {
	s.ExportIds = v
	return s
}
247985
func (s *DestinationDescription) SetDestinationId(v string) *DestinationDescription {
	s.DestinationId = &v
	return s
}
139826
func (gce *Cloud) ExternalID(nodeName types.NodeName) (string, error) {
	instanceName := mapNodeNameToInstanceName(nodeName)
	if gce.useMetadataServer {
		// Use metadata, if possible, to fetch ID. See issue #12000
		if gce.isCurrentInstance(instanceName) {
			externalInstanceID, err := getCurrentExternalIDViaMetadata()
			if err == nil {
				return externalInstanceID, nil
			}
		}
	}

	// Fallback to GCE API call if metadata server fails to retrieve ID
	inst, err := gce.getInstanceByName(instanceName)
	if err != nil {
		return "", err
	}
	return strconv.FormatUint(inst.ID, 10), nil
}